diff options
Diffstat (limited to 'modern/src')
-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 }); |