Skip to content
Discussion options

You must be logged in to vote

Hi,

In Next 15 a breaking change was introduced.

Please do these changes:

type Props = {
  params: Promise<{ blogName: string }>
  searchParams?: Promise<{ [key: string]: string | string[] | undefined }>
}

And then you'll need to await before reading the blogName:

export async function generateMetadata(
  { params }: Props,
  _parent: ResolvingMetadata
): Promise<Metadata> {
  const { blogName } = await params;
  const blog = IndividualBlogData.find(blog => blog.name === blogName)

// and later on


// ✅ Page component using proper param typing
export default async function BlogPage({ params }: Props) {
  const { blogName } = await params;
  const blog = IndividualBlogData.find(blog => blog.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@sumanth-narem
Comment options

@icyJoseph
Comment options

@sumanth-narem
Comment options

Answer selected by icyJoseph
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants