BillEditForm: added location title @ top

This commit is contained in:
2024-01-17 16:06:54 +01:00
parent bdf9c10303
commit c7c7bf2924
3 changed files with 16 additions and 3 deletions

View File

@@ -9,12 +9,12 @@ export default async function Page({ params:{ id } }: { params: { id:string } })
const [location, bill] = await fetchBillById(locationID, billID) ?? [];
if (!bill) {
if (!bill || !location) {
return(notFound());
}
return (
<Main>
<BillEditForm locationID={locationID} bill={bill} billYear={location?.yearMonth.year} />
<BillEditForm location={location} bill={bill} />
</Main>
);
}