- add multiple languages

- switch from moment to dayjs
This commit is contained in:
Amruth Pillai
2020-07-21 11:07:19 +05:30
parent e4f40f04ff
commit 7aab7c74f6
28 changed files with 255 additions and 416 deletions

View File

@ -1,4 +1,4 @@
import moment from 'moment/min/moment-with-locales';
import dayjs from 'dayjs';
import React, { memo, useContext } from 'react';
import { useTranslation } from 'react-i18next';
import ReactMarkdown from 'react-markdown';
@ -17,7 +17,7 @@ const AwardItem = (x) => {
</div>
{x.date && (
<h6 className="text-xs font-medium text-right">
{moment(x.date)
{dayjs(x.date)
.locale(i18n.language.substr(0, 2))
.format('MMMM YYYY')}
</h6>

View File

@ -1,4 +1,4 @@
import moment from 'moment/min/moment-with-locales';
import dayjs from 'dayjs';
import React, { memo, useContext } from 'react';
import { useTranslation } from 'react-i18next';
import ReactMarkdown from 'react-markdown';
@ -17,7 +17,7 @@ const CertificationItem = (x) => {
</div>
{x.date && (
<h6 className="text-xs font-medium text-right">
{moment(x.date)
{dayjs(x.date)
.locale(i18n.language.substr(0, 2))
.format('MMMM YYYY')}
</h6>

View File

@ -1,4 +1,4 @@
import moment from 'moment/min/moment-with-locales';
import dayjs from 'dayjs';
import React, { memo, useContext } from 'react';
import { useTranslation } from 'react-i18next';
import ReactMarkdown from 'react-markdown';
@ -21,7 +21,7 @@ const ProjectItem = (x) => {
</div>
{x.date && (
<h6 className="text-xs font-medium text-right">
{moment(x.date)
{dayjs(x.date)
.locale(i18n.language.substr(0, 2))
.format('MMMM YYYY')}
</h6>