Dev Helpers

Next.js / Print order routes

Bindery dispatch estimate

Dev Helpers · September 3, 2026

A dispatch estimate needs a clear starting date and handling-time rule. Disclose what happens on non-working days if the estimate is shown to customers.

Worked example

// 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>;
}

Implementation notes

Formatting a local dispatch date after using UTC arithmetic can shift the displayed day. Use one explicit calendar convention across the calculation.

Try it yourself

Compare an order placed early in the week with one placed on a Friday.

Open the Next.js example →

Editorial date September 3, 2026 · Published December 6, 2026

Related articles

Free bin volume

Free storage volume depends on consistent dimensions and units. Derive capacity and usage in the same unit before formatting a human-readable summary.

Draft preview indexing

Draft pages need deliberate indexing metadata. An indexing directive controls crawler intent, while access to unpublished material needs a separate permission check.

Party size allocation

Allocating a party into groups is an integer problem. The remainder determines whether another group is needed and how full it will be.