Skip to content

Commit 2756433

Browse files
authored
Merge pull request #1730 from SundeepChand/bugfix/resetproj
Reset files on logout
2 parents eb86100 + e373114 commit 2756433

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Diff for: client/modules/User/actions.js

+11
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,16 @@ export function validateSession() {
141141
};
142142
}
143143

144+
export function resetProject(dispatch) {
145+
dispatch({
146+
type: ActionTypes.RESET_PROJECT
147+
});
148+
dispatch({
149+
type: ActionTypes.CLEAR_CONSOLE
150+
});
151+
browserHistory.push('/');
152+
}
153+
144154
export function logoutUser() {
145155
return (dispatch) => {
146156
apiClient
@@ -149,6 +159,7 @@ export function logoutUser() {
149159
dispatch({
150160
type: ActionTypes.UNAUTH_USER
151161
});
162+
resetProject(dispatch);
152163
})
153164
.catch((error) => {
154165
const { response } = error;

0 commit comments

Comments
 (0)