Prefer next’s defaultLocale over hardcoded English

This commit is contained in:
Jaidyn Ann 2025-01-05 10:49:44 -06:00
parent 01d6604955
commit f4d5135453
Signed by: jadedctrl
GPG Key ID: FEF4FCF78B4BF019
3 changed files with 6 additions and 6 deletions

View File

@ -20,7 +20,7 @@ const getServerSideProps: GetServerSideProps = async (ctx) => {
if (user) {
return {
props: {
...(await serverSideTranslations(user.locale ?? "en", ["common"])),
...(await serverSideTranslations(user.locale ?? i18n.defaultLocale, ["common"])),
},
};
}
@ -49,7 +49,7 @@ const getServerSideProps: GetServerSideProps = async (ctx) => {
return {
props: {
...(await serverSideTranslations(bestMatch ?? "en", ["common"])),
...(await serverSideTranslations(bestMatch ?? i18n.defaultLocale, ["common"])),
},
};
};

View File

@ -290,7 +290,7 @@ const getServerSideProps: GetServerSideProps = async (ctx) => {
return {
props: {
availableLogins,
...(await serverSideTranslations(user.locale ?? "en", ["common"])),
...(await serverSideTranslations(user.locale ?? i18n.defaultLocale, ["common"])),
},
};
}
@ -320,7 +320,7 @@ const getServerSideProps: GetServerSideProps = async (ctx) => {
return {
props: {
availableLogins,
...(await serverSideTranslations(bestMatch ?? "en", ["common"])),
...(await serverSideTranslations(bestMatch ?? i18n.defaultLocale, ["common"])),
},
};
};

View File

@ -337,7 +337,7 @@ const getServerSideProps: GetServerSideProps = async (ctx) => {
return {
props: {
availableLogins,
...(await serverSideTranslations(user.locale ?? "en", ["common"])),
...(await serverSideTranslations(user.locale ?? i18n.defaultLocale, ["common"])),
},
};
}
@ -367,7 +367,7 @@ const getServerSideProps: GetServerSideProps = async (ctx) => {
return {
props: {
availableLogins,
...(await serverSideTranslations(bestMatch ?? "en", ["common"])),
...(await serverSideTranslations(bestMatch ?? i18n.defaultLocale, ["common"])),
},
};
};