mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2025-06-01 23:44:32 -04:00
handle logout on messages page (#1503)
Go back to redirecting to splash on logout, and empty messages page too.
This commit is contained in:
parent
432a6240aa
commit
b77e278927
2 changed files with 7 additions and 1 deletions
src/views/messages
|
@ -44,6 +44,12 @@ var Messages = React.createClass({
|
|||
this.props.dispatch(
|
||||
messageActions.getScratcherInvite(this.props.user.username, this.props.user.token)
|
||||
);
|
||||
} else {
|
||||
// user is logged out, empty messages
|
||||
this.props.dispatch(messageActions.setMessages([]));
|
||||
this.props.dispatch(messageActions.setAdminMessages([]));
|
||||
this.props.dispatch(messageActions.setScratcherInvite({}));
|
||||
this.props.dispatch(messageActions.setMessagesOffset(0));
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue