chore(org): Only add English to getStaticPaths
This commit is contained in:
parent
70676804f4
commit
8f9bb8189e
2 changed files with 2 additions and 15 deletions
|
@ -53,14 +53,8 @@ export async function getStaticProps({ locale, params }) {
|
|||
* To learn more, see: https://nextjs.org/docs/basic-features/data-fetching
|
||||
*/
|
||||
export async function getStaticPaths() {
|
||||
const enPaths = [...collection].map((design) => `/designs/${design}`)
|
||||
const paths = [...enPaths]
|
||||
for (const lang of siteConfig.languages.filter((lang) => lang !== 'en')) {
|
||||
paths.push(...enPaths.map((path) => `/${lang}${path}`))
|
||||
}
|
||||
|
||||
return {
|
||||
paths,
|
||||
paths: [...collection].map((design) => `/designs/${design}`),
|
||||
fallback: 'blocking',
|
||||
}
|
||||
}
|
||||
|
|
|
@ -73,14 +73,7 @@ export async function getStaticPaths() {
|
|||
//.filter((path) => path.split('/').length < 5)
|
||||
|
||||
return {
|
||||
paths: [
|
||||
...somePaths.map((key) => `/${key}`),
|
||||
...somePaths.map((key) => `/es/${key}`),
|
||||
...somePaths.map((key) => `/de/${key}`),
|
||||
...somePaths.map((key) => `/fr/${key}`),
|
||||
...somePaths.map((key) => `/nl/${key}`),
|
||||
...somePaths.map((key) => `/uk/${key}`),
|
||||
],
|
||||
paths: somePaths.map((key) => `/${key}`),
|
||||
fallback: false,
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue