next.js/test/integration/rewrite-with-browser-history/pages/index.js
index.js20 lines353 B
import { useRouter } from 'next/router'

export default function Page() {
  const router = useRouter()

  return (
    <>
      <p id="index">index page</p>
      <p id="pathname">{router.pathname}</p>
      <p id="query">{JSON.stringify(router.query)}</p>

      <br />
    </>
  )
}

export const getServerSideProps = () => {
  return { props: {} }
}
Quest for Codev2.0.0
/
SIGN IN