Remove the per-route 'export const instant = false' opt-outs now that the root layout carries the single Cache Components opt-out. Child pages inherit the opt-out, so admin/mod/radio leaf pages that only access cached or DB data stay instant while runtime-dependent pages remain dynamic. Update the staff-smoke contract test to assert the root-layout contract.
24 lines
725 B
TypeScript
24 lines
725 B
TypeScript
import { redirect } from "next/navigation";
|
|
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
|
import { AuditClient } from "./audit-client";
|
|
|
|
export default async function AuditPage() {
|
|
const { session, permissions } = await getAdminContext();
|
|
if (!canAccess(permissions, PERMS.ASSETS_IMPORT, session.user.rank)) {
|
|
redirect("/admin");
|
|
}
|
|
|
|
return (
|
|
<div className="space-y-6">
|
|
<div>
|
|
<h1 className="text-2xl font-bold tracking-tight">Catalog Audit</h1>
|
|
<p className="text-muted-foreground mt-1">
|
|
Scan your entire furniture catalog for missing entries, broken
|
|
references, missing files, and items available from clone sources.
|
|
</p>
|
|
</div>
|
|
<AuditClient />
|
|
</div>
|
|
);
|
|
}
|