19 lines
519 B
TypeScript
19 lines
519 B
TypeScript
import { fetchLocationById } from '@/app/lib/actions/locationActions';
|
|
import { BillEditForm } from '@/app/ui/BillEditForm';
|
|
import { Main } from '@/app/ui/Main';
|
|
import { notFound } from 'next/navigation';
|
|
|
|
export default async function Page({ params:{ id:locationID } }: { params: { id:string } }) {
|
|
|
|
const location = await fetchLocationById(locationID);
|
|
|
|
if (!location) {
|
|
return(notFound());
|
|
}
|
|
|
|
return (
|
|
<Main>
|
|
<BillEditForm location={location} />
|
|
</Main>
|
|
);
|
|
} |