import { useRouter } from 'next/router' export default function Comment({ params }) { const router = useRouter() if (router.isFallback) return 'Loading...' return ( <>
{router.asPath}
{JSON.stringify(router.query)}
{JSON.stringify(params)}
> ) } export const getStaticProps = ({ params }) => { return { props: { params, }, } } export const getStaticPaths = () => { return { paths: [], fallback: true, } }