Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/canary' into basepath/multi-le…
…vel-public
- Loading branch information
Showing
12 changed files
with
188 additions
and
7 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
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,19 @@ | ||
if (typeof window !== 'undefined') { | ||
window.caughtWarns = [] | ||
|
||
const origWarn = window.console.warn | ||
const origError = window.console.error | ||
|
||
window.console.warn = function (...args) { | ||
window.caughtWarns.push(args.join(' ')) | ||
origWarn(...args) | ||
} | ||
window.console.error = function (...args) { | ||
window.caughtWarns.push(args.join(' ')) | ||
origError(...args) | ||
} | ||
} | ||
|
||
export default function MyApp({ Component, pageProps }) { | ||
return <Component {...pageProps} /> | ||
} |
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,56 @@ | ||
import Link from 'next/link' | ||
import { useRouter } from 'next/router' | ||
|
||
export default function Page(props) { | ||
const router = useRouter() | ||
|
||
return ( | ||
<> | ||
<p id="frank">frank 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="/another"> | ||
<a id="to-another">to /another</a> | ||
</Link> | ||
<br /> | ||
<Link href="/gsp"> | ||
<a id="to-gsp">to /gsp</a> | ||
</Link> | ||
<br /> | ||
<Link href="/gsp/fallback/first"> | ||
<a id="to-fallback-first">to /gsp/fallback/first</a> | ||
</Link> | ||
<br /> | ||
<Link href="/gsp/fallback/hello"> | ||
<a id="to-fallback-hello">to /gsp/fallback/hello</a> | ||
</Link> | ||
<br /> | ||
<Link href="/gsp/no-fallback/first"> | ||
<a id="to-no-fallback-first">to /gsp/no-fallback/first</a> | ||
</Link> | ||
<br /> | ||
<Link href="/gssp"> | ||
<a id="to-gssp">to /gssp</a> | ||
</Link> | ||
<br /> | ||
<Link href="/gssp/first"> | ||
<a id="to-gssp-slug">to /gssp/first</a> | ||
</Link> | ||
<br /> | ||
</> | ||
) | ||
} | ||
|
||
export const getStaticProps = ({ locale, locales, defaultLocale }) => { | ||
return { | ||
props: { | ||
locale, | ||
locales, | ||
defaultLocale, | ||
}, | ||
} | ||
} |
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
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