Skip to content

Commit

Permalink
Rerender the start screen when the user OR the project state changes
Browse files Browse the repository at this point in the history
  • Loading branch information
waxlamp committed Mar 10, 2017
1 parent 8193238 commit 4108f45
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions web_external/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,13 @@ observeStore(next => {
}
}, s => s.get('mode'));

// Update start screen with login/logout changes.
observeStore(
next => startScreen.render({
username: next.getIn(['user', 'login']),
openProject: !!next.getIn(['project', 'id'])
}),
s => s.get('user')
);
// Update start screen with login/logout/project changes.
const updateStartScreen = state => startScreen.render({
username: state.getIn(['user', 'login']),
openProject: !!state.getIn(['project', 'id'])
});
observeStore(updateStartScreen, s => s.get('user'));
observeStore(updateStartScreen, s => s.getIn(['project', 'id']));

// Open a project.
observeStore(next => {
Expand Down

0 comments on commit 4108f45

Please sign in to comment.