Skip to content

Commit

Permalink
localize user during logout
Browse files Browse the repository at this point in the history
  • Loading branch information
tomivm committed Aug 4, 2022
1 parent 50b4c39 commit 13276b8
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/components/Account/Login/Login.actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ import {
changePitch,
changeRate
} from '../../../providers/SpeechProvider/SpeechProvider.actions';
import { disableTour } from '../../App/App.actions';
import {
disableTour,
setUnloggedUserLocation,
updateUnloggedUserLocation
} from '../../App/App.actions';
import { getVoiceURI } from '../../../i18n';

export function loginSuccess(payload) {
Expand All @@ -17,6 +21,14 @@ export function loginSuccess(payload) {
}

export function logout() {
return async dispatch => {
dispatch(setUnloggedUserLocation(null));
dispatch(updateUnloggedUserLocation());
dispatch(logoutSuccess());
};
}

function logoutSuccess() {
return {
type: LOGOUT
};
Expand Down

0 comments on commit 13276b8

Please sign in to comment.