wallet-connect-web-examples/advanced/wallets/react-wallet-auth/src/pages/_app.tsx
Glitch deb123f283
restructure (#345)
* restructure

* udpate readme links
2023-12-13 15:36:25 -03:00

26 lines
843 B
TypeScript

import Layout from '@/components/Layout'
import Modal from '@/components/Modal'
import useInitialization from '@/hooks/useInitialization'
import useWalletConnectEventsManager from '@/hooks/useWalletConnectEventsManager'
import { createTheme, NextUIProvider } from '@nextui-org/react'
import { AppProps } from 'next/app'
import '../../public/main.css'
export default function App({ Component, pageProps }: AppProps) {
// Step 1 - Initialize wallets and wallet connect client
const initialized = useInitialization()
// Step 2 - Once initialized, set up wallet connect event manager
useWalletConnectEventsManager(initialized)
return (
<NextUIProvider theme={createTheme({ type: 'dark' })}>
<Layout initialized={initialized}>
<Component {...pageProps} />
</Layout>
<Modal />
</NextUIProvider>
)
}