mirror of
https://github.com/zadam/trilium.git
synced 2025-11-09 16:08:58 +01:00
feat(collections/calendar): use formatting locale
This commit is contained in:
parent
53805e9c49
commit
b0bd60b9a4
@ -197,11 +197,11 @@ function usePlugins(isEditable: boolean, isCalendarRoot: boolean) {
|
||||
}
|
||||
|
||||
function useLocale() {
|
||||
const [ locale ] = useTriliumOption("locale");
|
||||
const [ formattingLocale ] = useTriliumOption("formattingLocale");
|
||||
const [ calendarLocale, setCalendarLocale ] = useState<LocaleInput>();
|
||||
|
||||
useEffect(() => {
|
||||
const correspondingLocale = LOCALE_MAPPINGS[locale];
|
||||
const correspondingLocale = LOCALE_MAPPINGS[formattingLocale];
|
||||
if (correspondingLocale) {
|
||||
correspondingLocale().then((locale) => setCalendarLocale(locale.default));
|
||||
} else {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user