HomePage: switched to client-side rendering

This commit is contained in:
2024-02-08 13:23:23 +01:00
parent 4633b36474
commit 8703decb91
3 changed files with 74 additions and 27 deletions

View File

@@ -1,7 +1,11 @@
import { FC, Suspense } from 'react';
import { Main } from './ui/Main';
import HomePage from './ui/HomePage';
import { HomePageSkeleton } from './ui/MonthCardSceleton';
import dynamic from 'next/dynamic'
const HomePage = dynamic(
() => import('./ui/HomePage'),
{ ssr: false }
)
export interface PageProps {
searchParams?: {
@@ -14,9 +18,7 @@ const Page:FC<PageProps> = async ({ searchParams }) => {
return (
<Main>
<Suspense fallback={<HomePageSkeleton />}>
<HomePage searchParams={searchParams} />
</Suspense>
<HomePage />
</Main>
);
}