From 6ce2dca701beda1f3f3bb7f5d48ef208947039ac Mon Sep 17 00:00:00 2001 From: hamid zarghami Date: Wed, 16 Apr 2025 09:14:04 +0330 Subject: [PATCH] blog --- src/app/blogs/[id]/page.tsx | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/app/blogs/[id]/page.tsx b/src/app/blogs/[id]/page.tsx index 04cf289..8ef1ad4 100644 --- a/src/app/blogs/[id]/page.tsx +++ b/src/app/blogs/[id]/page.tsx @@ -3,15 +3,20 @@ import { blogSingleQueryOptions } from '../hooks/useBlogsData' import { NextPage } from 'next' import SingleBlogPage from '../components/SingleBlogPage' -// eslint-disable-next-line @typescript-eslint/no-explicit-any -const SingleBlog: NextPage = async ({ params }) => { +interface PageProps { + params: Promise<{ + id: string + }> +} +const SingleBlog: NextPage = async ({ params }) => { + const { id } = await params const queryClient = new QueryClient() - await queryClient.prefetchQuery(blogSingleQueryOptions(params.id)) + await queryClient.prefetchQuery(blogSingleQueryOptions(id)) return ( - + ) }