constantly receiving the error, tried fixing with ai and search, and npm run build returns always the same error:
Type error: Type 'BlogPageProps' does not satisfy the constraint 'PageProps'.
Types of prperty 'params' are incompatible.
Type '{ slug: string; }' is missing the following properties from type 'Promise<any>': then, catch, finally, [Symbol.toStringTag]
Next.js build worker exited with code: 1 and signal: null```
```tsx
import { BlogPost, getAllPosts, getPostBySlug } from "@/lib/blog"
import { BlogPostComponent } from "../../components/blog-post"
export async function generateStaticParams() {
const posts = await getAllPosts()
return posts.map(post => ({ slug: post.slug }))
}
export default async function BlogPage({ params }: { params: { slug: string } }) {
const post: BlogPost | null = await getPostBySlug(params.slug)
if (!post) {
return <div>Post not found</div>
}
return (
<main>
<h1>{post.title}</h1>
<BlogPostComponent content={post.content} />
</main>
)
}```