replaces moment with luxon (#621)

This commit is contained in:
Philip Molares 2020-10-02 14:00:29 +02:00 committed by GitHub
parent 733df9b94a
commit 20e296cb9b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 36 additions and 56 deletions

View file

@ -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])