import { Suspense } from "react";
import { StaffReportView } from "@/components/StaffReportView";
import { SiteHeader, SiteFooter } from "@/components/SiteChrome";
import { staffAuthQuery } from "@/lib/staff-auth";
interface PageProps {
searchParams: Promise<{ org?: string; key?: string; exp?: string; sig?: string; frame?: 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, exp, sig, frame } = await searchParams;
const isFramed = frame === "1";
// Generic "not found" if the token/key is missing or wrong — don't
// confirm route existence.
const authQuery = staffAuthQuery({ org, exp, sig, key });
if (!authQuery) {
return
The page you requested doesn't exist.
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).