import type { AppProps } from 'next/app' import Head from 'next/head' import { ToastContainer, Zoom } from 'react-toastify' import 'react-toastify/dist/ReactToastify.min.css' import { QueryClient, QueryClientProvider } from '@tanstack/react-query' import detectEthereumProvider from '@metamask/detect-provider' import '../styles/globals.css' import Layout from 'components/Layout' import { useEffect } from 'react' import useWalletStore from 'stores/useWalletStore' async function isMetamaskInstalled(): Promise { const provider = await detectEthereumProvider() return !!provider } const queryClient = new QueryClient() function MyApp({ Component, pageProps }: AppProps) { const actions = useWalletStore((s) => s.actions) // init store useEffect(() => { const verifyMetamask = async () => { actions.setMetamaskInstalledStatus(await isMetamaskInstalled()) } verifyMetamask() }, [actions]) return ( <> Mars V2 {/* */} ) } export default MyApp