Merge pull request #4843 from freesewing/joost
fix: SSR config and migration of units/newsletter setting
This commit is contained in:
commit
6087be123e
6 changed files with 7 additions and 7 deletions
|
@ -1642,12 +1642,12 @@ const migrateUser = (v2) => {
|
|||
ihash: hash(initial),
|
||||
img: 'default-avatar',
|
||||
initial,
|
||||
imperial: v2.units === 'imperial',
|
||||
imperial: v2.settings.units === 'imperial',
|
||||
language: v2.settings.language,
|
||||
lastSeen: new Date(),
|
||||
lusername: v2.username.toLowerCase(),
|
||||
mfaEnabled: false,
|
||||
newsletter: false,
|
||||
newsletter: v2.newsletter === true ? true : false,
|
||||
patron: v2.patron,
|
||||
role: v2._id === '5d62aa44ce141a3b816a3dd9' ? 'admin' : 'user',
|
||||
status: v2.status === 'active' ? 1 : 0,
|
||||
|
|
|
@ -80,5 +80,5 @@ export const getStaticPaths = async () => {
|
|||
}
|
||||
}
|
||||
|
||||
return { paths, fallback: false }
|
||||
return { paths, fallback: true }
|
||||
}
|
||||
|
|
|
@ -85,4 +85,4 @@ export async function getStaticProps({ locale, params }) {
|
|||
* 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 })
|
||||
export const getStaticPaths = async () => ({ paths: [], fallback: true })
|
||||
|
|
|
@ -84,4 +84,4 @@ export async function getStaticProps({ locale, params }) {
|
|||
* 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 })
|
||||
export const getStaticPaths = async () => ({ paths: [], fallback: true })
|
||||
|
|
|
@ -64,4 +64,4 @@ export async function getStaticProps({ locale, params }) {
|
|||
* 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 })
|
||||
export const getStaticPaths = async () => ({ paths: [], fallback: true })
|
||||
|
|
|
@ -84,6 +84,6 @@ export async function getStaticPaths() {
|
|||
...somePaths.map((key) => `/nl/${key}`),
|
||||
...somePaths.map((key) => `/uk/${key}`),
|
||||
],
|
||||
fallback: false,
|
||||
fallback: true,
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue