This commit is contained in:
hamid zarghami
2025-04-16 10:53:27 +03:30
parent 6ce2dca701
commit 3fe334d3ad
15 changed files with 770 additions and 157 deletions
+12 -1
View File
@@ -1,10 +1,21 @@
import { NextPage } from 'next'
import { Suspense } from 'react'
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 () => {
import Loading from './loading'
const Home: NextPage = () => {
return (
<Suspense fallback={<Loading />}>
<HomeContent />
</Suspense>
)
}
async function HomeContent() {
const queryClient = new QueryClient()
await queryClient.prefetchQuery(landingQueryOptions)