middleware fix wip
This commit is contained in:
@@ -12,11 +12,15 @@ interface AdminLayoutProps {
|
||||
* Uses RouteGuard to enforce access control server-side.
|
||||
*/
|
||||
export default async function AdminLayout({ children }: AdminLayoutProps) {
|
||||
console.log('[ADMIN LAYOUT] ========== ADMIN LAYOUT CALLED ==========');
|
||||
const headerStore = await headers();
|
||||
const pathname = headerStore.get('x-pathname') || '/';
|
||||
console.log('[ADMIN LAYOUT] Pathname:', pathname);
|
||||
|
||||
const guard = createRouteGuard();
|
||||
console.log('[ADMIN LAYOUT] About to call guard.enforce');
|
||||
await guard.enforce({ pathname });
|
||||
console.log('[ADMIN LAYOUT] guard.enforce completed successfully');
|
||||
|
||||
return (
|
||||
<div className="min-h-screen bg-deep-graphite">
|
||||
|
||||
Reference in New Issue
Block a user