store locale in localStorage only if user is not logged in

This commit is contained in:
Delucse
2020-12-14 20:04:49 +01:00
parent 49730f51ac
commit b04a5bc591
2 changed files with 5 additions and 2 deletions
+1 -1
View File
@@ -8,7 +8,7 @@ export const visitPage = () => (dispatch) => {
};
export const setLanguage = (language) => (dispatch, getState) => {
if(!getState().auth.isAuthenticated){
if(!getState().auth.progress && !getState().auth.isAuthenticated){
window.localStorage.setItem('locale', language);
}
dispatch({