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