implement error handling

This commit is contained in:
Michi 2025-04-21 11:27:08 +02:00
parent 39005d46a5
commit 7d2dea886c
5 changed files with 144 additions and 8 deletions

View file

@ -1,6 +1,7 @@
import Form from '@/app/ui/invoices/edit-form';
import Breadcrumbs from '@/app/ui/invoices/breadcrumbs';
import { fetchCustomers, fetchInvoiceById } from '@/app/lib/data';
import { notFound } from 'next/navigation';
export default async function Page(props: {
params: Promise<{
@ -14,6 +15,10 @@ export default async function Page(props: {
fetchCustomers(),
]);
if(!invoice){
notFound();
}
return (
<main>
<Breadcrumbs