static id

This commit is contained in:
hamid zarghami
2025-04-16 12:26:28 +03:30
parent d87925998f
commit 5e5f02ee06
4 changed files with 4007 additions and 17 deletions
+10 -10
View File
@@ -5,20 +5,20 @@ import { NextPage } from 'next'
import SingleBlogPage from '../components/SingleBlogPage'
import Loading from './loading'
interface PageProps {
params: Promise<{
id: string
}>
}
// interface PageProps {
// params: Promise<{
// id: string
// }>
// }
const SingleBlog: NextPage<PageProps> = async ({ params }) => {
const SingleBlog: NextPage = async () => {
const { id } = await params
console.log("loading", id);
// const { id } = await params
// console.log("loading", id);
return (
<Suspense fallback={<Loading />}>
<BlogContent id={id} />
<BlogContent id={'7539fa00-e8e0-4b2b-a4b5-655284b5e8a1'} />
</Suspense>
)
}
@@ -28,7 +28,7 @@ async function BlogContent({ id }: { id: string }) {
const queryClient = new QueryClient()
await Promise.all([
queryClient.prefetchQuery(blogSingleQueryOptions(id)),
queryClient.prefetchQuery(blogSingleQueryOptions('7539fa00-e8e0-4b2b-a4b5-655284b5e8a1')),
// queryClient.prefetchQuery(mostVisitedBlogsQueryOptions)
])