This commit is contained in:
hamid zarghami
2025-04-16 11:17:48 +03:30
parent 9bfe3981aa
commit fd220a19ae
+3
View File
@@ -12,7 +12,9 @@ interface PageProps {
} }
const SingleBlog: NextPage<PageProps> = async ({ params }) => { const SingleBlog: NextPage<PageProps> = async ({ params }) => {
const { id } = await params const { id } = await params
console.log("loading", id);
return ( return (
<Suspense fallback={<Loading />}> <Suspense fallback={<Loading />}>
@@ -22,6 +24,7 @@ const SingleBlog: NextPage<PageProps> = async ({ params }) => {
} }
async function BlogContent({ id }: { id: string }) { async function BlogContent({ id }: { id: string }) {
console.log(id)
const queryClient = new QueryClient() const queryClient = new QueryClient()
await queryClient.prefetchQuery(blogSingleQueryOptions(id)) await queryClient.prefetchQuery(blogSingleQueryOptions(id))
await queryClient.prefetchQuery(mostVisitedBlogsQueryOptions) await queryClient.prefetchQuery(mostVisitedBlogsQueryOptions)