refactoring

This commit is contained in:
Antoine M 2024-03-13 17:52:05 +01:00
parent 351d1b7d14
commit 6c8a3828f7

View File

@ -39,13 +39,10 @@ export function UserContextProvider({ children }) {
}, [language]); }, [language]);
function changeUserLanguage(newLanguage) { function changeUserLanguage(newLanguage) {
console.log(`userLanguage`, newLanguage);
setLanguage(newLanguage); setLanguage(newLanguage);
localStorage.setItem("userLanguage", newLanguage); localStorage.setItem("userLanguage", newLanguage);
} }
function changeCountry(newCountry) { function changeCountry(newCountry) {
console.log(`newCountry`, newCountry);
setCountry(newCountry); setCountry(newCountry);
localStorage.setItem("userCountry", JSON.stringify(newCountry)); localStorage.setItem("userCountry", JSON.stringify(newCountry));
} }