update
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
import Form from '@/app/ui/invoices/edit-form';
|
||||
import Breadcrumbs from '@/app/ui/invoices/breadcrumbs';
|
||||
import { fetchInvoiceById, fetchCustomers } from '@/app/lib/data';
|
||||
import { notFound } from 'next/navigation';
|
||||
import { Metadata } from 'next';
|
||||
|
||||
import type { Metadata } from "next";
|
||||
import { notFound } from "next/navigation";
|
||||
import { fetchCustomers, fetchInvoiceById } from "@/app/lib/data";
|
||||
import Breadcrumbs from "@/app/ui/invoices/breadcrumbs";
|
||||
import Form from "@/app/ui/invoices/edit-form";
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: 'Edit invoices',
|
||||
title: "Edit invoices",
|
||||
};
|
||||
|
||||
export default async function Page(props: { params: Promise<{ id: string }> }) {
|
||||
@@ -16,17 +16,17 @@ export default async function Page(props: { params: Promise<{ id: string }> }) {
|
||||
fetchCustomers(),
|
||||
]);
|
||||
|
||||
if (!invoice) {
|
||||
if (!invoice) {
|
||||
notFound();
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<main>
|
||||
<Breadcrumbs
|
||||
breadcrumbs={[
|
||||
{ label: 'Invoices', href: '/dashboard/invoices' },
|
||||
{ label: "Invoices", href: "/dashboard/invoices" },
|
||||
{
|
||||
label: 'Edit Invoice',
|
||||
label: "Edit Invoice",
|
||||
href: `/dashboard/invoices/${id}/edit`,
|
||||
active: true,
|
||||
},
|
||||
@@ -35,4 +35,4 @@ if (!invoice) {
|
||||
<Form invoice={invoice} customers={customers} />
|
||||
</main>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user