Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

View /home on registered /w team #689

Merged
merged 2 commits into from
Feb 14, 2017
Merged

Conversation

lukebarnard1
Copy link
Contributor

No description provided.

@@ -227,6 +227,9 @@ module.exports = React.createClass({
const teamToken = data.team_token;
// Store for use /w welcome pages
window.localStorage.setItem('mx_team_token', teamToken);
// Set the team token and view homepage
window.matrixChat._teamToken = teamToken;
window.mxDispatcher.dispatch({action: 'view_home_page'});
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We shouldn't be accessing these through the window object. We should get the dispatcher by import dispatcher and probably pass the team token up with a callback prop.

Also, I'm a little skeptical about the view_home_page dispatch: is there not somewhere else that decides what page to display once registration is complete and can we do this there (are we going to race with it?)

Copy link
Contributor Author

@lukebarnard1 lukebarnard1 Feb 13, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll add an extra callback prop that handles the team token.

@dbkr dbkr merged commit 18cba1f into develop Feb 14, 2017
@lukebarnard1 lukebarnard1 deleted the luke/rts-set-team-token-view-home branch February 14, 2017 10:42
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants