mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-30 06:45:47 -04:00
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:
parent
194199aee1
commit
aedd86fbed
7 changed files with 51 additions and 17 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue