Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions react/components/ExtensionPoint/index.tsx
Original file line number Diff line number Diff line change
@@ -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(
Expand Down Expand Up @@ -225,8 +225,8 @@ const ExtensionPoint: FC<Props> = (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 },
])
}, [
Expand Down
6 changes: 3 additions & 3 deletions react/utils/slots.tsx
Original file line number Diff line number Diff line change
@@ -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'

Expand Down Expand Up @@ -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]
)
Expand Down