-
Notifications
You must be signed in to change notification settings - Fork 27.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
- Loading branch information
1 parent
9fb1e60
commit 9bbfa0e
Showing
5 changed files
with
255 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
import Link from 'next/link' | ||
import { useRouter } from 'next/router' | ||
|
||
export default function Page(props) { | ||
const router = useRouter() | ||
const { nextLocale } = router.query | ||
|
||
return ( | ||
<> | ||
<p id="links">links page</p> | ||
<p id="props">{JSON.stringify(props)}</p> | ||
<p id="router-locale">{router.locale}</p> | ||
<p id="router-locales">{JSON.stringify(router.locales)}</p> | ||
<p id="router-query">{JSON.stringify(router.query)}</p> | ||
<p id="router-pathname">{router.pathname}</p> | ||
<p id="router-as-path">{router.asPath}</p> | ||
<Link href={`/${nextLocale}/another`} locale={false}> | ||
<a id="to-another">to /another</a> | ||
</Link> | ||
<br /> | ||
<Link href={`/${nextLocale}/gsp`} locale={false}> | ||
<a id="to-gsp">to /gsp</a> | ||
</Link> | ||
<br /> | ||
<Link href={`/${nextLocale}/gsp/fallback/first`} locale={false}> | ||
<a id="to-fallback-first">to /gsp/fallback/first</a> | ||
</Link> | ||
<br /> | ||
<Link href={`/${nextLocale}/gsp/fallback/hello`} locale={false}> | ||
<a id="to-fallback-hello">to /gsp/fallback/hello</a> | ||
</Link> | ||
<br /> | ||
<Link href={`/${nextLocale}/gsp/no-fallback/first`} locale={false}> | ||
<a id="to-no-fallback-first">to /gsp/no-fallback/first</a> | ||
</Link> | ||
<br /> | ||
<Link href={`/${nextLocale}/gssp`} locale={false}> | ||
<a id="to-gssp">to /gssp</a> | ||
</Link> | ||
<br /> | ||
<Link href={`/${nextLocale}/gssp/first`} locale={false}> | ||
<a id="to-gssp-slug">to /gssp/first</a> | ||
</Link> | ||
<br /> | ||
</> | ||
) | ||
} | ||
|
||
// make SSR page so we have query values immediately | ||
export const getServerSideProps = () => { | ||
return { | ||
props: {}, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters