moved all the pages into [locale]

This commit is contained in:
2024-02-16 15:51:26 +01:00
parent 64bd026d46
commit ba0934e8cd
19 changed files with 0 additions and 93 deletions

View File

@@ -0,0 +1,6 @@
import { NotFoundPage } from '@/app/ui/NotFoundPage';
const BillNotFound = () =>
<NotFoundPage title="404 Bill Not Found" description="Could not find the requested Bill." />;
export default BillNotFound;

View File

@@ -0,0 +1,22 @@
import { notFound } from 'next/navigation';
import { fetchLocationById } from '@/app/lib/actions/locationActions';
import { LocationDeleteForm } from '@/app/ui/LocationDeleteForm';
import { BillDeleteForm } from '@/app/ui/BillDeleteForm';
import { fetchBillById } from '@/app/lib/actions/billActions';
import { Main } from '@/app/ui/Main';
export default async function Page({ params:{ id } }: { params: { id:string } }) {
const [locationID, billID] = id.split('-');
const [location, bill] = await fetchBillById(locationID, billID) ?? [];
if (!location || !bill) {
return(notFound());
}
return (
<Main>
<BillDeleteForm location={location} bill={bill} />
</Main>
);
}