Fix share page feedback auth (#3284)

* fix: share page mark auth

* perf: lang check

* perf: load share
This commit is contained in:
Archer
2024-12-01 21:09:13 +08:00
committed by GitHub
parent d0e8c9c62e
commit 1cef206c13
7 changed files with 39 additions and 76 deletions

View File

@@ -22,5 +22,6 @@ export const langMap = {
};
export const serviceSideProps = (content: any, ns: I18nNsType = []) => {
return serverSideTranslations(content.locale, ['common', 'error', ...ns], null, content.locales);
const lang = content.req?.cookies?.NEXT_LOCALE || content.locale;
return serverSideTranslations(lang, ['common', 'error', ...ns], null, content.locales);
};