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