Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fab585a

Browse files
committed
test: make sure fixture prerender non-default locale as well
1 parent fe07468 commit fab585a

File tree

1 file changed

+3
-2
lines changed
  • tests/fixtures/page-router-base-path-i18n/pages/fallback-true

1 file changed

+3
-2
lines changed

tests/fixtures/page-router-base-path-i18n/pages/fallback-true/[slug].js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,16 @@ export async function getStaticProps({ params }) {
2727
}
2828
}
2929

30-
export const getStaticPaths = () => {
30+
/** @type {import('next').GetStaticPaths} */
31+
export const getStaticPaths = ({ locales }) => {
3132
return {
3233
paths: [
3334
{
3435
params: {
3536
slug: 'prerendered',
3637
},
3738
},
38-
],
39+
].flatMap((pathDescription) => locales.map((locale) => ({ ...pathDescription, locale }))),
3940
fallback: true,
4041
}
4142
}

0 commit comments

Comments
 (0)