rsnext/test/integration/rewrite-with-browser-history/pages/index.js
Pepijn Senders 9c3780fbce
Fix rewrite and dynamic params on navigating to initial history entry (#25495)
* Fix rewrite and dynamic params

* set _shouldResolveHref to true when initializing client state

* add window.beforeNav check

* fix broken path

* fix build-output tests

* remove yarn.lock changes
2021-06-01 16:29:43 -05:00

19 lines
353 B
JavaScript

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: {} }
}