import { useRouter } from 'next/router' export const getStaticProps = () => { return { props: { nested: false, hello: 'hello', }, } } export default function Index({ hello, nested }) { const { query, pathname } = useRouter() return ( <>

{nested ? 'yes' : 'no'}

{hello} world

{JSON.stringify(query)}

{pathname}

) }