Revert "chore: Remove getStaticPaths from dynamic account routes"
This reverts commit 8da064398e
.
This commit is contained in:
parent
46c5b724f0
commit
87ef2b20bc
2 changed files with 35 additions and 0 deletions
|
@ -52,3 +52,31 @@ export async function getStaticProps({ locale, params }) {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* getStaticPaths() is used to specify for which routes (think URLs)
|
||||||
|
* this page should be used to generate the result.
|
||||||
|
*
|
||||||
|
* On this page, it is returning a truncated list of routes (think URLs) for all
|
||||||
|
* the mdx blog (markdown) content.
|
||||||
|
* That list comes from prebuild/blog-paths.mjs, which is built in the prebuild step
|
||||||
|
* and contains paths, titles, imageUrls, and intro for all blog posts.
|
||||||
|
*
|
||||||
|
* the fallback: 'blocking' property means that
|
||||||
|
* any pages that haven't been pre-generated
|
||||||
|
* will generate and cache the first time someone visits them
|
||||||
|
*
|
||||||
|
* To learn more, see: https://nextjs.org/docs/basic-features/data-fetching
|
||||||
|
*/
|
||||||
|
export const getStaticPaths = async () => {
|
||||||
|
const paths = []
|
||||||
|
for (const platform of Object.keys(freeSewingConfig.account.fields.identities).filter(
|
||||||
|
(key) => key !== 'github'
|
||||||
|
)) {
|
||||||
|
for (const locale of siteConfig.languages) {
|
||||||
|
paths.push({ params: { platform }, locale })
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return { paths, fallback: false }
|
||||||
|
}
|
||||||
|
|
|
@ -78,3 +78,10 @@ export async function getStaticProps({ locale, params }) {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* getStaticPaths() is used to specify for which routes (think URLs)
|
||||||
|
* this page should be used to generate the result.
|
||||||
|
* To learn more, see: https://nextjs.org/docs/basic-features/data-fetching
|
||||||
|
*/
|
||||||
|
export const getStaticPaths = async () => ({ paths: [], fallback: false })
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue