Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(with zones): params causes a failure to compile #72238

Open
wants to merge 4 commits into
base: canary
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion examples/with-zones/blog/app/blog/post/[id]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
import Link from "next/link";

export default function Post({ params: { id } }) {
type Params = Promise<{ id: string }>;

export async function generateMetadata(props: { params: Params }) {
const { id } = await props.params;
return {
title: `Post #${id}`,
description: "Lorem ipsum",
};
}

export default async function Post(props: { params: Params }) {
const { id } = await props.params;
return (
<div>
<h3>Post #{id}</h3>
Expand Down
Loading