import { Suspense } from "react";
import { StaffReportView } from "@/components/StaffReportView";
import { SiteHeader, SiteFooter } from "@/components/SiteChrome";
import { isStaffKeyValid } from "@/lib/staff-auth";
interface PageProps {
searchParams: Promise<{ org?: string; key?: string }>;
}
export const metadata = {
title: "Staff report — Food Co-op Initiative",
robots: { index: false, follow: false },
};
export default async function StaffReportPage({ searchParams }: PageProps) {
const { org, key } = await searchParams;
// Generic "not found" if the key is missing or wrong — don't confirm
// route existence.
if (!isStaffKeyValid(key)) {
return
The page you requested doesn't exist.
Not found
Add ?org=<civi-org-id> to the URL. The org
id is the Civi Contact id of the organization (visible in the URL when
viewing the org in CiviCRM).