Open this example in the interactive library
Source code
// app/print/page.tsx
export default async function BinderyDispatchEstimate({
searchParams,
}: {
searchParams: Promise<Record<string, string | string[] | undefined>>;
}) {
const { copies } = await searchParams;
const n = Math.max(1, Number(copies) || 100);
return <p>{Math.ceil(n / 80)} production days at 80 copies per day</p>;
}
