I’m trying to create a blog. Here i need to create a page from the database. But it tells me that the Id property does not exist, although it is detected.
Here’s the error with the ID
where: {
id: params.id,
}
Here is the whole file
import prisma from '@/lib/db';
import { FC } from 'react'
interface BlogDetailProps {
params: {
id: string,
}
}
const BlogDetail: FC<BlogDetailProps> = async( params ) => {
const post = await prisma.post.findFirst({
where: {
id: params.id,
},
include: {
author: true,
},
});
return (
<div className='max-w-4xl mx-auto py-8'>
<img src={post?.image} alt={post?.title} />
<h2>{post?.title}</h2>
<p>Written by: {post?.author?.name}</p>
<div className='mt-4'>{post?.content}</div>
</div>
)
}
export default BlogDetail```

