mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-29 06:15:29 -04:00
replaces moment with luxon (#621)
This commit is contained in:
parent
733df9b94a
commit
20e296cb9b
12 changed files with 36 additions and 56 deletions
|
@ -1,4 +1,4 @@
|
|||
import moment from 'moment'
|
||||
import { Settings } from 'luxon'
|
||||
import React, { useCallback } from 'react'
|
||||
import { Form } from 'react-bootstrap'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
|
@ -47,7 +47,7 @@ const LanguagePicker: React.FC = () => {
|
|||
|
||||
const onChangeLang = useCallback(() => async (event: React.ChangeEvent<HTMLSelectElement>) => {
|
||||
const language = event.currentTarget.value
|
||||
moment.locale(language)
|
||||
Settings.defaultLocale = language
|
||||
await i18n.changeLanguage(language)
|
||||
}, [i18n])
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue