HomePage: switched to client-side rendering
This commit is contained in:
12
app/page.tsx
12
app/page.tsx
@@ -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>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user