Dev Helpers
← Back

Guide feedback link

Place this file at app/guide/[slug]/page.tsx in an App Router project.

Open this example in the interactive library

Source code

// app/guide/[slug]/page.tsx

import Link from "next/link";

export default async function GuideFeedbackLink({
  params,
}: {
  params: Promise<{ slug: string }>;
}) {
  const { slug } = await params;
  return (
    <main>
      <h1>{slug}</h1>
      <Link href={{ pathname: "/feedback", query: { guide: slug } }}>
        Send feedback on this guide
      </Link>
    </main>
  );
}