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 | |
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
-rw-r--r-- | modern/src/App.js | 2 | ||||
-rw-r--r-- | modern/src/common/localization.js | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/modern/src/App.js b/modern/src/App.js index d3ba39ad..5143ad88 100644 --- a/modern/src/App.js +++ b/modern/src/App.js @@ -91,4 +91,4 @@ const App = () => { ); }; -export default App;
\ No newline at end of file +export default App; 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 }); |