changed date-fns to moment (#23)

changed date-fns to moment
fixes #22
made use of i18n support of moment

Signed-off-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
Philip Molares 2020-05-16 15:42:02 +02:00 committed by GitHub
parent 194199aee1
commit aedd86fbed
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 51 additions and 17 deletions

View file

@ -1,10 +1,12 @@
import React from "react";
import {useTranslation} from "react-i18next";
import moment from "moment";
const LanguagePicker: React.FC = () => {
const {i18n} = useTranslation();
const onChangeLang = (event: React.ChangeEvent<HTMLSelectElement>) => {
moment.locale(event.currentTarget.value);
i18n.changeLanguage(event.currentTarget.value);
}