go get -u and js format

This commit is contained in:
nikk gitanes
2021-09-09 01:38:22 +03:00
parent 5101c91a90
commit 313d1122a0
3 changed files with 71 additions and 36 deletions

View File

@@ -2,7 +2,12 @@ import { useTranslation } from 'react-i18next'
export default () => {
const { i18n } = useTranslation()
const currentLanguage = i18n.language === 'en-US' || i18n.language === 'en' ? 'en' : i18n.language === 'ru-RU' || i18n.language === 'ru' ? 'ru' : i18n.language
const currentLanguage =
i18n.language === 'en-US' || i18n.language === 'en'
? 'en'
: i18n.language === 'ru-RU' || i18n.language === 'ru'
? 'ru'
: i18n.language
return [currentLanguage, lang => i18n.changeLanguage(lang)]
}