22
33// IMP START - Setup Web3Auth Provider
44import { Web3AuthProvider , type Web3AuthContextConfig } from "@web3auth/modal/react" ;
5- import { WEB3AUTH_NETWORK } from "@web3auth/modal" ;
5+ import { IWeb3AuthState , WEB3AUTH_NETWORK } from "@web3auth/modal" ;
66// IMP END - Setup Web3Auth Provider
77// IMP START - Setup Wagmi Provider
88import { WagmiProvider } from "@web3auth/modal/react/wagmi" ;
99import { QueryClient , QueryClientProvider } from "@tanstack/react-query" ;
10+ import React from "react" ;
1011// IMP END - Setup Wagmi Provider
1112
1213// IMP START - Dashboard Registration
@@ -23,14 +24,16 @@ const web3AuthContextConfig: Web3AuthContextConfig = {
2324 clientId,
2425 web3AuthNetwork : WEB3AUTH_NETWORK . SAPPHIRE_MAINNET ,
2526 authBuildEnv : "testing" ,
27+ ssr : true ,
28+
2629 }
2730 } ;
2831// IMP END - Config
2932
30- export default function Provider ( { children } : { children : React . ReactNode } ) {
31- return (
33+ export default function Provider ( { children, web3authInitialState } : { children : React . ReactNode , web3authInitialState : IWeb3AuthState | undefined } ) {
34+ return (
3235 // IMP START - Setup Web3Auth Provider
33- < Web3AuthProvider config = { web3AuthContextConfig } >
36+ < Web3AuthProvider config = { web3AuthContextConfig } initialState = { web3authInitialState } >
3437 { /* // IMP END - Setup Web3Auth Provider */ }
3538 { /*// IMP START - Setup Wagmi Provider*/ }
3639 < QueryClientProvider client = { queryClient } >
0 commit comments