Skip to content

Commit

Permalink
fix(dcellar-web-ui): fix redux-persist ssr issue
Browse files Browse the repository at this point in the history
  • Loading branch information
devinxl committed Sep 19, 2023
1 parent c2b4a43 commit f129d13
Showing 1 changed file with 18 additions and 16 deletions.
34 changes: 18 additions & 16 deletions apps/dcellar-web-ui/src/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { Page } from '@/components/layout/Page';
import { ReactNode } from 'react';
import { StatusDetail } from '@/modules/object/components/StatusDetail';

export const ssrLandingRoutes =['/price-calculator', '/'];
export const ssrLandingRoutes = ['/price-calculator', '/'];
function DcellarApp({ Component, ...rest }: AppProps) {
const { store, props } = wrapper.useWrappedStore(rest);
const persistor = persistStore(store, {}, function () {
Expand All @@ -32,21 +32,23 @@ function DcellarApp({ Component, ...rest }: AppProps) {
<SEOHead />
<Provider store={store}>
<PersistGate persistor={persistor}>
<ThemeProvider theme={theme}>
<WalletConnectProvider>
<LoginContextProvider inline={!!customLayout}>
<OffChainAuthProvider>
{getLayout(
<PageProtect>
<Component {...props.pageProps} />
<GAPageView />
<StatusDetail />
</PageProtect>,
)}
</OffChainAuthProvider>
</LoginContextProvider>
</WalletConnectProvider>
</ThemeProvider>
{() => (
<ThemeProvider theme={theme}>
<WalletConnectProvider>
<LoginContextProvider inline={!!customLayout}>
<OffChainAuthProvider>
{getLayout(
<PageProtect>
<Component {...props.pageProps} />
<GAPageView />
<StatusDetail />
</PageProtect>,
)}
</OffChainAuthProvider>
</LoginContextProvider>
</WalletConnectProvider>
</ThemeProvider>
)}
</PersistGate>
</Provider>
</>
Expand Down

0 comments on commit f129d13

Please sign in to comment.