d3e308a79f
* Add basePath in link component and add/remove it consistently * Update to not use regex for delBasePath * Expose addBasePath as router method * Revert "Expose addBasePath as router method" This reverts commit 40fed596195c6affabf837e42d472452768e13a3. * Expose basePath as router field * Apply suggestion * Expose basePath as router field * remove un-used vars * Update externals * Apply lint fix * Update size-limit test * Update prefetch
13 lines
272 B
JavaScript
13 lines
272 B
JavaScript
import Link from 'next/link'
|
|
import { useRouter } from 'next/router'
|
|
|
|
export default () => (
|
|
<>
|
|
<Link href="/other-page">
|
|
<a id="other-page-link">
|
|
<h1>Hello World</h1>
|
|
</a>
|
|
</Link>
|
|
<div id="base-path">{useRouter().basePath}</div>
|
|
</>
|
|
)
|