import { NextPage } from 'next'
import { HydrationBoundary } from '@tanstack/react-query'
import { dehydrate } from '@tanstack/react-query'
import { QueryClient } from '@tanstack/react-query'
import { landingQueryOptions } from './home/hooks/useHomeData'
import LangingPage from './home/LangingPage'
const Home: NextPage = async () => {
  const queryClient = new QueryClient()
  await queryClient.prefetchQuery(landingQueryOptions)

  return (
    <HydrationBoundary state={dehydrate(queryClient)}>
      <LangingPage />
    </HydrationBoundary>
  )
}

export default Home