From ee02cc4f32b5a4da7fe035bc4f2871acbc1311f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nikola=20Dere=C5=BEi=C4=87?= Date: Thu, 8 Feb 2024 14:07:09 +0100 Subject: [PATCH] LocationAddPage migrated to client-side component --- app/location/[id]/add/LocationAddPage.tsx | 5 ++--- app/location/[id]/add/page.tsx | 6 +----- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/app/location/[id]/add/LocationAddPage.tsx b/app/location/[id]/add/LocationAddPage.tsx index ebef49f..a099506 100644 --- a/app/location/[id]/add/LocationAddPage.tsx +++ b/app/location/[id]/add/LocationAddPage.tsx @@ -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 (); diff --git a/app/location/[id]/add/page.tsx b/app/location/[id]/add/page.tsx index fed90e0..3f032fc 100644 --- a/app/location/[id]/add/page.tsx +++ b/app/location/[id]/add/page.tsx @@ -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 (
- }> - - +
); } \ No newline at end of file