export default async function AdminPagesLayout({ children }: PropsWithChildren) {
if (await isAdministrator()) return <>{children}</>;
logger.error('Unauthorized access to admin pages');
return (
<div className="h-screen w-screen flex flex-col gap-y-5 justify-center items-center">
🔒
<b className="text-lg">Unauthorized access to admin pages</b>
<Link href="/">
<Button>Go home</Button>
</Link>
</div>
);
}
export default async function AdminPagesLayout({ children }: PropsWithChildren) {
if (await isAdministrator()) return <>{children}</>;
logger.error('Unauthorized access to admin pages');
return (
<div className="h-screen w-screen flex flex-col gap-y-5 justify-center items-center">
🔒
<b className="text-lg">Unauthorized access to admin pages</b>
<Link href="/">
<Button>Go home</Button>
</Link>
</div>
);
}