Initial commit
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
// app/dashboard/page.tsx (server component)
|
||||
import { requireUser } from '@/lib/auth-check';
|
||||
import DashboardClient from './dashboard-client'; // will be your existing client UI
|
||||
|
||||
export default async function DashboardPage() {
|
||||
// will redirect to /login if not authenticated
|
||||
const session = await requireUser('/login');
|
||||
|
||||
// you can optionally pass session to client via props if desired:
|
||||
return <DashboardClient />;
|
||||
}
|
||||
Reference in New Issue
Block a user