Files
Andrew S Erwin b9721ff13f
release gate / check (push) Failing after 8m35s
initial commit on Federted servers
2026-10-19 16:23:55 -05:00

12 lines
511 B
TypeScript

import { auth } from '@/auth'
import { redirect } from 'next/navigation'
import { AppShellWrapper } from '@/components/app-shell-wrapper'
export default async function AppLayout({ children }: { children: React.ReactNode }) {
const session = await auth()
if (!session?.user) redirect('/login')
// Pass the server session down so the shell and screens render during SSR
// instead of being discarded and refetched on the client.
return <AppShellWrapper session={session}>{children}</AppShellWrapper>
}