diff --git a/react/components/ExtensionPoint/index.tsx b/react/components/ExtensionPoint/index.tsx index 32081de3..36378697 100644 --- a/react/components/ExtensionPoint/index.tsx +++ b/react/components/ExtensionPoint/index.tsx @@ -1,19 +1,19 @@ import { mergeDeepRight, reduce } from 'ramda' import React, { FC, Fragment, Suspense, useMemo } from 'react' -import ComponentLoader from './ComponentLoader' -import Loading from '../Loading' -import { useRuntime } from '../RenderContext' -import type { RenderContext } from '../RenderContext' +import { Route } from '../../typings/runtime' import { useTreePath } from '../../utils/treePath' -import NoSSR from '../NoSSR' import { withErrorBoundary } from '../ErrorBoundary' -import GenericPreview from '../Preview/GenericPreview' -import LoadingBar from '../LoadingBar' +import FoldableContainer from '../FoldableContainer' import { LazyImages } from '../LazyImages' import LazyRender from '../LazyRender' -import FoldableContainer from '../FoldableContainer' -import { Route } from '../../typings/runtime' +import Loading from '../Loading' +import LoadingBar from '../LoadingBar' +import NoSSR from '../NoSSR' +import GenericPreview from '../Preview/GenericPreview' +import type { RenderContext } from '../RenderContext' +import { useRuntime } from '../RenderContext' +import ComponentLoader from './ComponentLoader' // TODO: Export components separately on @vtex/blocks-inspector, so this import can be simplified const InspectBlockWrapper = React.lazy( @@ -225,8 +225,8 @@ const ExtensionPoint: FC = (props) => { /** Props from the blockProps prop, used when the user wants to prevent overriding * the native ExtensionPoint props (such as `id`) */ - blockProps || {}, content, + blockProps || {}, { params, query }, ]) }, [ diff --git a/react/utils/slots.tsx b/react/utils/slots.tsx index d4c228e8..226e69e5 100644 --- a/react/utils/slots.tsx +++ b/react/utils/slots.tsx @@ -1,7 +1,7 @@ import React, { FC, useMemo } from 'react' -import { getChildExtensions } from '../components/ExtensionPoint/index' import ComponentLoader from '../components/ExtensionPoint/ComponentLoader' +import { getChildExtensions } from '../components/ExtensionPoint/index' import { useRuntime } from '../components/RenderContext' import { Extension } from '../typings/runtime' @@ -30,12 +30,12 @@ export function generateSlot({ const componentLoaderPropsWithContent = useMemo( () => ({ - // Props received by the slot being used directly as a component - ...props, // Props received by the block referenced by slotValue in a user's theme ...componentProps, // Content saved in the CMS for this treePath ...extensionContent, + // Props received by the slot being used directly as a component + ...props, }), [componentProps, extensionContent, props] )