Skip to article
Documentation

src/app/policy/page.tsx

Linked repository file from this build.

import { PolicyPage } from "@/features/policy/page";
import { getPageActor } from "@/lib/auth/page";
import { can } from "@/lib/auth/scope";
import { listPolicies } from "@/lib/db/policy-store";
export default async function Page() {
  const actor = await getPageActor();
  if (!can(actor, "report")) return null;
  return <PolicyPage initial={await listPolicies()} />;
}