93f7061c53
- Fix TypeScript type error in deleteInvoice server action (returned
{message: string} instead of void, incompatible with form action type)
- Add export const dynamic = "force-dynamic" to dashboard pages that
make DB calls at build time (/dashboard, /dashboard/invoices,
/dashboard/invoices/create) to prevent failed static prerendering
- Fix import order in customers/page.tsx (export before import was invalid)
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
31 lines
726 B
TypeScript
31 lines
726 B
TypeScript
import type { Metadata } from "next";
|
|
import { fetchCustomers } from "@/app/lib/data";
|
|
import Breadcrumbs from "@/app/ui/invoices/breadcrumbs";
|
|
import Form from "@/app/ui/invoices/create-form";
|
|
|
|
export const dynamic = "force-dynamic";
|
|
|
|
export const metadata: Metadata = {
|
|
title: "Create invoices",
|
|
};
|
|
|
|
export default async function Page() {
|
|
const customers = await fetchCustomers();
|
|
|
|
return (
|
|
<main>
|
|
<Breadcrumbs
|
|
breadcrumbs={[
|
|
{ label: "Invoices", href: "/dashboard/invoices" },
|
|
{
|
|
label: "Create Invoice",
|
|
href: "/dashboard/invoices/create",
|
|
active: true,
|
|
},
|
|
]}
|
|
/>
|
|
<Form customers={customers} />
|
|
</main>
|
|
);
|
|
}
|