LocationAddPage migrated to client-side component
This commit is contained in:
@@ -1,8 +1,7 @@
|
|||||||
import { notFound } from 'next/navigation';
|
"use client";
|
||||||
|
|
||||||
import { LocationEditForm } from '@/app/ui/LocationEditForm';
|
import { LocationEditForm } from '@/app/ui/LocationEditForm';
|
||||||
import { fetchLocationById } from '@/app/lib/actions/locationActions';
|
|
||||||
import { YearMonth } from '@/app/lib/db-types';
|
import { YearMonth } from '@/app/lib/db-types';
|
||||||
import { Main } from '@/app/ui/Main';
|
|
||||||
|
|
||||||
export default async function LocationAddPage({ yearMonth }: { yearMonth:YearMonth }) {
|
export default async function LocationAddPage({ yearMonth }: { yearMonth:YearMonth }) {
|
||||||
return (<LocationEditForm yearMonth={yearMonth} />);
|
return (<LocationEditForm yearMonth={yearMonth} />);
|
||||||
|
|||||||
@@ -1,15 +1,11 @@
|
|||||||
import { parseYearMonth } from '@/app/lib/format';
|
import { parseYearMonth } from '@/app/lib/format';
|
||||||
import { LocationEditFormSkeleton } from '@/app/ui/LocationEditForm';
|
|
||||||
import LocationAddPage from './LocationAddPage';
|
import LocationAddPage from './LocationAddPage';
|
||||||
import { Main } from '@/app/ui/Main';
|
import { Main } from '@/app/ui/Main';
|
||||||
import { Suspense } from 'react';
|
|
||||||
|
|
||||||
export default async function Page({ params:{ id } }: { params: { id:string } }) {
|
export default async function Page({ params:{ id } }: { params: { id:string } }) {
|
||||||
return (
|
return (
|
||||||
<Main>
|
<Main>
|
||||||
<Suspense fallback={<LocationEditFormSkeleton />}>
|
<LocationAddPage yearMonth={ parseYearMonth(id) } />
|
||||||
<LocationAddPage yearMonth={ parseYearMonth(id) } />
|
|
||||||
</Suspense>
|
|
||||||
</Main>
|
</Main>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user