Skip to content

Commit e16e3eb

Browse files
committed
Reset files on logout
1 parent 06396bd commit e16e3eb

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

client/modules/User/actions.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,13 +128,24 @@ export function validateSession() {
128128
};
129129
}
130130

131+
export function resetProject(dispatch) {
132+
dispatch({
133+
type: ActionTypes.RESET_PROJECT
134+
});
135+
dispatch({
136+
type: ActionTypes.CLEAR_CONSOLE
137+
});
138+
browserHistory.push('/');
139+
}
140+
131141
export function logoutUser() {
132142
return (dispatch) => {
133143
apiClient.get('/logout')
134144
.then(() => {
135145
dispatch({
136146
type: ActionTypes.UNAUTH_USER
137147
});
148+
resetProject(dispatch);
138149
})
139150
.catch((error) => {
140151
const { response } = error;

0 commit comments

Comments
 (0)