LocationAddPage migrated to client-side component

This commit is contained in:
2024-02-08 14:07:09 +01:00
parent e2f7b21a5e
commit ee02cc4f32
2 changed files with 3 additions and 8 deletions

View File

@@ -1,8 +1,7 @@
import { notFound } from 'next/navigation';
"use client";
import { LocationEditForm } from '@/app/ui/LocationEditForm';
import { fetchLocationById } from '@/app/lib/actions/locationActions';
import { YearMonth } from '@/app/lib/db-types';
import { Main } from '@/app/ui/Main';
export default async function LocationAddPage({ yearMonth }: { yearMonth:YearMonth }) {
return (<LocationEditForm yearMonth={yearMonth} />);

View File

@@ -1,15 +1,11 @@
import { parseYearMonth } from '@/app/lib/format';
import { LocationEditFormSkeleton } from '@/app/ui/LocationEditForm';
import LocationAddPage from './LocationAddPage';
import { Main } from '@/app/ui/Main';
import { Suspense } from 'react';
export default async function Page({ params:{ id } }: { params: { id:string } }) {
return (
<Main>
<Suspense fallback={<LocationEditFormSkeleton />}>
<LocationAddPage yearMonth={ parseYearMonth(id) } />
</Suspense>
<LocationAddPage yearMonth={ parseYearMonth(id) } />
</Main>
);
}