mirror of
https://github.com/kou029w/_.git
synced 2025-01-31 06:18:07 +00:00
Kohei Watanabe
90bb5008c5
git-subtree-dir: next git-subtree-mainline:5d936d154e
git-subtree-split:19b6c91e86
14 lines
406 B
TypeScript
14 lines
406 B
TypeScript
import { useRouter } from "next/router";
|
|
|
|
export function getStaticPaths() {
|
|
return { paths: [{ params: { path: "test" } }], fallback: false };
|
|
}
|
|
|
|
export function getStaticProps({ params }: { params: unknown }) {
|
|
return { props: params };
|
|
}
|
|
|
|
export default function ({ path }: { path: string }) {
|
|
const { query } = useRouter();
|
|
return <pre>{JSON.stringify({ path, ...query }, null, " ")}</pre>;
|
|
}
|