parent
4028ebcfcd
commit
aa9cb5924a
@ -1,9 +0,0 @@ |
|||||||
import map from 'lodash/map' |
|
||||||
import includes from 'lodash/includes' |
|
||||||
|
|
||||||
import { langsList } from 'config/languages' |
|
||||||
|
|
||||||
export const isSupportedLang = (lang: string) => { |
|
||||||
const supportedLangs = map(langsList, 'locale') |
|
||||||
return includes(supportedLangs, lang) |
|
||||||
} |
|
||||||
@ -0,0 +1,10 @@ |
|||||||
|
import map from 'lodash/map' |
||||||
|
import includes from 'lodash/includes' |
||||||
|
|
||||||
|
import type { Languages } from 'config/languages' |
||||||
|
import { langsList } from 'config/languages' |
||||||
|
|
||||||
|
export const isSupportedLang = (lang: string): lang is Languages => { |
||||||
|
const supportedLangs = map(langsList, ({ locale }) => locale) |
||||||
|
return includes(supportedLangs, lang) |
||||||
|
} |
||||||
Loading…
Reference in new issue