1
0
Fork 0

Merge pull request #4843 from freesewing/joost

fix: SSR config and migration of units/newsletter setting
This commit is contained in:
Joost De Cock 2023-08-28 08:07:36 +02:00 committed by GitHub
commit 6087be123e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 7 additions and 7 deletions

View file

@ -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,

View file

@ -80,5 +80,5 @@ export const getStaticPaths = async () => {
}
}
return { paths, fallback: false }
return { paths, fallback: true }
}

View file

@ -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 })

View file

@ -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 })

View file

@ -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 })

View file

@ -84,6 +84,6 @@ export async function getStaticPaths() {
...somePaths.map((key) => `/nl/${key}`),
...somePaths.map((key) => `/uk/${key}`),
],
fallback: false,
fallback: true,
}
}