🐛 Fix locale for calendar and clock (#1330)

This commit is contained in:
Tagaishi
2023-09-01 17:13:55 +02:00
committed by GitHub
parent 3b74f735a1
commit 981c964ba9
3 changed files with 13 additions and 12 deletions

View File

@@ -57,7 +57,7 @@ function App(
) {
const { Component, pageProps } = props;
// TODO: make mapping from our locales to moment locales
const language = getLanguageByCode(pageProps.locale);
const language = getLanguageByCode(pageProps.session?.user?.language ?? 'en');
require(`dayjs/locale/${language.locale}.js`);
dayjs.locale(language.locale);