2023-01-14 19:31:05 +00:00
|
|
|
import type {AppProps} from 'next/app'
|
2023-04-11 21:46:47 +00:00
|
|
|
import {createBrowserSupabaseClient} from '@supabase/auth-helpers-nextjs'
|
|
|
|
import {SessionContextProvider, Session} from '@supabase/auth-helpers-react'
|
|
|
|
import {useState} from 'react'
|
2023-01-14 19:31:05 +00:00
|
|
|
import {Header} from '@/components/Header'
|
|
|
|
import {Footer} from '@/components/Footer'
|
|
|
|
|
2023-01-19 21:53:37 +00:00
|
|
|
import '../styles/tailwind.css'
|
2023-01-14 19:31:05 +00:00
|
|
|
import 'focus-visible'
|
|
|
|
|
2023-04-11 21:46:47 +00:00
|
|
|
export default function App({Component, pageProps}: AppProps<{ initialSession: Session }>) {
|
|
|
|
const [supabaseClient] = useState(() => createBrowserSupabaseClient())
|
|
|
|
|
2023-01-14 19:31:05 +00:00
|
|
|
return (
|
2023-04-11 21:46:47 +00:00
|
|
|
<SessionContextProvider supabaseClient={supabaseClient} initialSession={pageProps.initialSession}>
|
2023-01-14 19:31:05 +00:00
|
|
|
<div className="fixed inset-0 flex justify-center sm:px-8">
|
|
|
|
<div className="flex w-full max-w-7xl lg:px-8">
|
2023-01-23 19:51:54 +00:00
|
|
|
<div className="w-full bg-white dark:bg-black-950 dark:ring-zinc-300/20"/>
|
2023-01-14 19:31:05 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div className="relative">
|
|
|
|
<Header/>
|
|
|
|
<main>
|
2023-02-17 22:26:49 +00:00
|
|
|
<Component {...pageProps} />
|
2023-01-14 19:31:05 +00:00
|
|
|
</main>
|
|
|
|
<Footer/>
|
|
|
|
</div>
|
2023-04-11 21:46:47 +00:00
|
|
|
</SessionContextProvider>
|
2023-01-14 19:31:05 +00:00
|
|
|
)
|
|
|
|
}
|