add pt-br to date/locales

This commit is contained in:
Dawid Wysokiński 2021-01-03 11:58:33 +01:00
parent 668f0410f8
commit f79bd11972

View File

@ -1,17 +1,20 @@
import { Locale as DFLocale } from 'date-fns';
import pl from 'date-fns/locale/pl';
import enGB from 'date-fns/locale/en-GB';
import ptBR from 'date-fns/locale/pt-BR';
import { DEFAULT_LANGUAGE } from '@config/app';
export type Locales = {
pl: DFLocale;
en: DFLocale;
br: DFLocale;
};
export type Locale = keyof Locales;
const locales: Locales = {
pl,
en: enGB,
br: ptBR,
};
export const getLocale = (lang: string): DFLocale => {