Location Edit / Add / Delete migrated to client-side rendering
This commit is contained in:
@@ -1,17 +1,17 @@
|
||||
import { notFound } from 'next/navigation';
|
||||
import { fetchLocationById } from '@/app/lib/actions/locationActions';
|
||||
import { LocationDeleteForm } from '@/app/ui/LocationDeleteForm';
|
||||
import { Main } from '@/app/ui/Main';
|
||||
import { Suspense } from 'react';
|
||||
import { LocationDeletePage } from './LocationDeletePage';
|
||||
import dynamic from 'next/dynamic'
|
||||
|
||||
const LocationDeletePage = dynamic(
|
||||
() => import('./LocationDeletePage'),
|
||||
{ ssr: false }
|
||||
)
|
||||
|
||||
|
||||
export default async function Page({ params:{ id } }: { params: { id:string } }) {
|
||||
|
||||
return (
|
||||
<Main>
|
||||
<Suspense fallback={<div>Loading...</div>}>
|
||||
<LocationDeletePage locationId={id} />
|
||||
</Suspense>
|
||||
<LocationDeletePage locationId={id} />
|
||||
</Main>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user