import { FC, Suspense } from 'react';
import { Main } from './ui/Main';
import HomePage from './ui/HomePage';
import { HomePageSkeleton } from './ui/MonthCardSceleton';

export interface PageProps {
  searchParams?: {
    year?: string;
    month?: string;
  };
}

const Page:FC<PageProps> = async ({ searchParams }) => {

 return (
    <Main>
      <Suspense fallback={<HomePageSkeleton />}>
        <HomePage searchParams={searchParams} />
      </Suspense>
    </Main>
  );
}

export default Page;