website refactor

This commit is contained in:
2026-01-14 02:02:24 +01:00
parent 8d7c709e0c
commit 4522d41aef
291 changed files with 12763 additions and 9309 deletions

View File

@@ -1,4 +1,5 @@
import { headers } from 'next/headers';
import { redirect } from 'next/navigation';
import { createRouteGuard } from '@/lib/auth/createRouteGuard';
interface AdminLayoutProps {
@@ -16,11 +17,14 @@ export default async function AdminLayout({ children }: AdminLayoutProps) {
const pathname = headerStore.get('x-pathname') || '/';
const guard = createRouteGuard();
await guard.enforce({ pathname });
const result = await guard.enforce({ pathname });
if (result.type === 'redirect') {
redirect(result.to);
}
return (
<div className="min-h-screen bg-deep-graphite">
{children}
</div>
);
}
}