-
-
Save Daltonic/9c242246cfaa297a1b1bb6c90ac4457a to your computer and use it in GitHub Desktop.
Dapp Bnb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { ToastContainer } from 'react-toastify' | |
import '@/styles/globals.css' | |
import 'react-toastify/dist/ReactToastify.css' | |
import '@rainbow-me/rainbowkit/styles.css' | |
import 'react-datepicker/dist/react-datepicker.css' | |
import { useEffect, useState } from 'react' | |
import Providers from '@/services/provider' | |
import { Footer, Header } from '@/components' | |
export default function App({ Component, pageProps }) { | |
const [showChild, setShowChild] = useState(false) | |
useEffect(() => { | |
setShowChild(true) | |
}, []) | |
if (!showChild || typeof window === 'undefined') { | |
return null | |
} else { | |
return ( | |
<Providers pageProps={pageProps}> | |
<div className="relative h-screen min-w-screen"> | |
<Header /> | |
<Component {...pageProps} /> | |
<div className="h-20"></div> | |
<Footer /> | |
</div> | |
<ToastContainer | |
position="bottom-center" | |
autoClose={5000} | |
hideProgressBar={false} | |
newestOnTop={false} | |
closeOnClick | |
rtl={false} | |
pauseOnFocusLoss | |
draggable | |
pauseOnHover | |
theme="dark" | |
/> | |
</Providers> | |
) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment