From a2e22bfc019230a3e19f3f6aecf5bdcd567b1abb Mon Sep 17 00:00:00 2001 From: hamid zarghami Date: Tue, 15 Apr 2025 17:01:59 +0330 Subject: [PATCH] fix type --- src/app/blogs/[id]/page.tsx | 11 ++++++----- src/app/blogs/components/SingleBlogPage.tsx | 6 +++--- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/app/blogs/[id]/page.tsx b/src/app/blogs/[id]/page.tsx index 5ec3e02..6719506 100644 --- a/src/app/blogs/[id]/page.tsx +++ b/src/app/blogs/[id]/page.tsx @@ -1,17 +1,18 @@ import { dehydrate, HydrationBoundary, QueryClient } from '@tanstack/react-query' -import { blogSingleQueryOptions, mostVisitedBlogsQueryOptions } from '../hooks/useBlogsData' -import SingleBlogPage from '../components/SingleBlogPage' +import { blogSingleQueryOptions } from '../hooks/useBlogsData' +// import SingleBlogPage from '../components/SingleBlogPage' import { NextPage } from 'next' -const SingleBlog: NextPage<{ params: { id: string } }> = async ({ params }) => { +// eslint-disable-next-line @typescript-eslint/no-explicit-any +const SingleBlog: NextPage = async ({ params }) => { const queryClient = new QueryClient() await queryClient.prefetchQuery(blogSingleQueryOptions(params.id)) - await queryClient.prefetchQuery(mostVisitedBlogsQueryOptions) return ( - + {/* */} +
) } diff --git a/src/app/blogs/components/SingleBlogPage.tsx b/src/app/blogs/components/SingleBlogPage.tsx index 67b9b8b..1255dd2 100644 --- a/src/app/blogs/components/SingleBlogPage.tsx +++ b/src/app/blogs/components/SingleBlogPage.tsx @@ -1,6 +1,6 @@ 'use client' import { Profile, Calendar } from 'iconsax-react' -import { NextPage } from 'next' +import { FC } from 'react' import Image from 'next/image' // import MostVisited from '../components/MostVisited' import ContactUs from '../components/ContactUs' @@ -12,7 +12,7 @@ type Props = { id: string } -const SingleBlog: NextPage = ({ id }) => { +const SingleBlogPage: FC = ({ id }) => { const { data } = useGetBlogSingle(id) if (!data) return
@@ -99,4 +99,4 @@ const SingleBlog: NextPage = ({ id }) => { ) } -export default SingleBlog \ No newline at end of file +export default SingleBlogPage \ No newline at end of file