portfolio/pages/_app.tsx

31 lines
1.1 KiB
TypeScript
Raw Normal View History

2023-01-14 19:31:05 +00:00
import type {AppProps} from 'next/app'
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'
export default function App({Component, pageProps}: AppProps<{ initialSession: Session }>) {
const [supabaseClient] = useState(() => createBrowserSupabaseClient())
2023-01-14 19:31:05 +00:00
return (
<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>
</SessionContextProvider>
2023-01-14 19:31:05 +00:00
)
}