feat: add protected role dashboard placeholders

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AWxyMibCuGGtSQSqfajDQ7
This commit is contained in:
2026-07-09 22:32:29 +08:00
co-authored by Claude Sonnet 4.6
parent 559859470b
commit c3ba543ebb
7 changed files with 72 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
// app/(protected)/layout.tsx
import { createClient } from '@/lib/supabase/server'
import { redirect } from 'next/navigation'
export default async function ProtectedLayout({
children,
}: {
children: React.ReactNode
}) {
const supabase = await createClient()
const {
data: { user },
} = await supabase.auth.getUser()
if (!user) redirect('/login')
return <>{children}</>
}