Skip to content

Commit

Permalink
fix: add ssr config to PageConstructor
Browse files Browse the repository at this point in the history
  • Loading branch information
makamekm committed Jan 24, 2025
1 parent 0220768 commit 6882b2e
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/components/App/Page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,12 @@ export function LegacyNavPage({data, props, controls}: PageProps) {

return (
<Page data={data} headerHeight={0} {...props} {...controls}>
<PageConstructorProvider theme={theme}>
<PageConstructorProvider
theme={theme}
ssrConfig={{
isServer: Boolean(process.env.BROWSER),
}}
>
<PageConstructor custom={custom} content={content.layout} />
</PageConstructorProvider>
</Page>
Expand Down Expand Up @@ -108,7 +113,12 @@ export function RichNavPage({data, props, controls}: PageProps<WithNavigation>)
);

return (
<PageConstructorProvider theme={theme}>
<PageConstructorProvider
theme={theme}
ssrConfig={{
isServer: Boolean(process.env.BROWSER),
}}
>
<PageConstructor
custom={custom}
content={content.layout}
Expand Down

0 comments on commit 6882b2e

Please sign in to comment.