first user setup and login
This commit is contained in:
21
app/(auth)/layout.tsx
Normal file
21
app/(auth)/layout.tsx
Normal file
@@ -0,0 +1,21 @@
|
||||
'use client'
|
||||
|
||||
import { SessionProvider, useSession } from 'next-auth/react'
|
||||
import { redirect } from 'next/navigation'
|
||||
import { ReactNode } from 'react'
|
||||
import Navbar from '@/components/Navbar'
|
||||
|
||||
export default function AuthLayout({ children }: { children: ReactNode }) {
|
||||
|
||||
return (
|
||||
<>
|
||||
<SessionProvider>
|
||||
<Navbar />
|
||||
<main className="p-4">
|
||||
{/* Could also add a private header here */}
|
||||
{children}
|
||||
</main>
|
||||
</SessionProvider>
|
||||
</>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user