-
Beta Was this translation helpful? Give feedback.
Answered by
icyJoseph
Dec 31, 2024
Replies: 2 comments 3 replies
-
Hi, Not sure why your terminal is not printing all errors, but you have an issue with app/[cat]/page.tsx
Type error: Type '{ params: { cat: string; }; }' does not satisfy the constraint 'PageProps'.
Types of property 'params' are incompatible.
Type '{ cat: string; }' is missing the following properties from type 'Promise<any>': then, catch, finally, [Symbol.toStringTag] Do these: type PostParams = {
params: Promise<{ cat: string }>;
searchParams?: Promise<{ [key: string]: string | string[] | undefined }>;
};
// and then further down
export async function generateMetadata({
params,
}: {
params: Promise<{ cat: string }>; // -> here, or better yet
}) {
// do this for generateMetadata
export async function generateMetadata({
params,
}: Pick<PostParams, 'params'>) { See it live here, https://stackblitz.com/edit/github-ybuhz3ly?file=app%2F[cat]%2Fpage.tsx |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
landed1
-
Find to connect personally. It's our rights to connect not only by net and find out to think not like mine but also by yours. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
Not sure why your terminal is not printing all errors, but you have an issue with
app/[cat]/page.tsx
:Do these: