Files
JJ KasperandGitHub 607ff2b322 Update to process redirects/rewrites for _next/data with middleware (#37574)
* Update to process redirects/rewrites for _next/data

* correct matched-path resolving with middleware

* Add next-data header

* migrate middleware tests

* lint-fix

* update error case

* update test case

* Handle additional resolving cases and add more tests

* update test from merge

* fix test

* rm .only

* apply changes from review

* ensure _next/data resolving does not apply without middleware
2022-06-10 12:35:12 -05:00

23 lines
420 B
JavaScript

export const getStaticPaths = async () => {
return {
fallback: 'blocking',
paths: [],
}
}
export const getStaticProps = async ({ params: { country }, locale }) => {
return {
props: { country, locale },
revalidate: false,
}
}
export default function CountryPage({ locale, country }) {
return (
<ul>
<li id="country">{country}</li>
<li id="locale">{locale}</li>
</ul>
)
}