diff options
Diffstat (limited to 'examples/hello-next/pages/posts')
-rw-r--r-- | examples/hello-next/pages/posts/[id].tsx | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/examples/hello-next/pages/posts/[id].tsx b/examples/hello-next/pages/posts/[id].tsx new file mode 100644 index 000000000..48413669c --- /dev/null +++ b/examples/hello-next/pages/posts/[id].tsx @@ -0,0 +1,19 @@ +import { useRouter } from "next/router"; +import Link from "next/link"; + +export default function Post({}) { + const router = useRouter(); + + return ( + <div style={{ padding: 16 }}> + <h1>Post: {router.query.id}</h1> + <ul> + <li> + <Link href="/"> + <a>Root page</a> + </Link> + </li> + </ul> + </div> + ); +} |