diff --git a/examples/sample-next-app/src/app/layout.tsx b/examples/sample-next-app/src/app/layout.tsx index 6cc0dfb2..ad6c9b06 100644 --- a/examples/sample-next-app/src/app/layout.tsx +++ b/examples/sample-next-app/src/app/layout.tsx @@ -3,9 +3,37 @@ import { Inter } from 'next/font/google'; import './globals.css'; +import type { WalletConnectOptions } from '@vechain/dapp-kit'; +import dynamic from 'next/dynamic'; + +const DAppKitProvider = dynamic( + async () => { + const { DAppKitProvider: _DAppKitProvider } = await import( + '@vechain/dapp-kit-react' + ); + return _DAppKitProvider; + }, + { + ssr: false, + }, +); const inter = Inter({ subsets: ['latin'] }); +const walletConnectOptions: WalletConnectOptions = { + projectId: 'a0b855ceaf109dbc8426479a4c3d38d8', + metadata: { + name: 'Sample VeChain dApp', + description: 'A sample VeChain dApp', + url: typeof window !== 'undefined' ? window.location.origin : '', + icons: [ + typeof window !== 'undefined' + ? `${window.location.origin}/images/logo/my-dapp.png` + : '', + ], + }, +}; + // eslint-disable-next-line import/no-default-export export default function RootLayout({ children, @@ -17,7 +45,18 @@ export default function RootLayout({