diff options
author | rahighi <rahighi> | 2021-08-29 08:47:15 +0430 |
---|---|---|
committer | rahighi <rahighi> | 2021-08-29 08:47:15 +0430 |
commit | 3676fb0033aaabe91a672d9661298559a22d02ca (patch) | |
tree | 8edc3a2da5a2a884b4ba8999937f7c9f5293ebd1 /modern/src/common | |
parent | f4ec386afac1eeee9418cd773f6f6e2e211d9e76 (diff) | |
download | trackermap-web-3676fb0033aaabe91a672d9661298559a22d02ca.tar.gz trackermap-web-3676fb0033aaabe91a672d9661298559a22d02ca.tar.bz2 trackermap-web-3676fb0033aaabe91a672d9661298559a22d02ca.zip |
some code refactoring and remove lint errors
Diffstat (limited to 'modern/src/common')
-rw-r--r-- | modern/src/common/localization.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/modern/src/common/localization.js b/modern/src/common/localization.js index 5f1b8863..7383788d 100644 --- a/modern/src/common/localization.js +++ b/modern/src/common/localization.js @@ -1,4 +1,4 @@ -import React, { useState, createContext, useContext, useEffect } from "react"; +import React, { useState, createContext, useContext } from "react"; import af from '../../../web/l10n/af.json'; import ar from '../../../web/l10n/ar.json'; @@ -141,14 +141,14 @@ export default key => { return selectedLanguage.data[key]; }; -export const setSelectedLanguage = (language) => { +const setSelectedLanguage = (language) => { selectedLanguage = supportedLanguages[language]; localStorage.setItem('language', language); } -export const defaultLanguage = language; +const defaultLanguage = language; -export const LocalizationContext = createContext({ +const LocalizationContext = createContext({ language }); |