<suspense> added to LocationEditPage
This commit is contained in:
16
app/location/[id]/edit/LocationEditPage.tsx
Normal file
16
app/location/[id]/edit/LocationEditPage.tsx
Normal file
@@ -0,0 +1,16 @@
|
||||
import { notFound } from 'next/navigation';
|
||||
import { LocationEditForm } from '@/app/ui/LocationEditForm';
|
||||
import { fetchLocationById } from '@/app/lib/actions/locationActions';
|
||||
|
||||
export default async function LocationEditPage({ locationId }: { locationId:string }) {
|
||||
|
||||
const location = await fetchLocationById(locationId);
|
||||
|
||||
if (!location) {
|
||||
return(notFound());
|
||||
}
|
||||
|
||||
const result = <LocationEditForm location={location} yearMonth={location.yearMonth} />;
|
||||
|
||||
return (result);
|
||||
}
|
||||
Reference in New Issue
Block a user