a4d2c6b0a6
## Issue Closes 627 account header doesn't refresh on sign up / log in ## Changes Looking back at "[Header] Changes, fixes and improvements (#493)", noticed that old code was looking at `has_verified_email` instead of just checking whether an email exists. So, restored original code. This does have a side-effect of the Logout button not showing any email address underneath it immediately after sign up (with the flow cancelled). But I vaguely recall it was that way previously. A refresh cleans it up. Perhaps another `user/me` when leaving the Sign Up page can make everything in sync, but this PR simpler to test.
17 lines
593 B
JavaScript
17 lines
593 B
JavaScript
import { connect } from 'react-redux';
|
|
import { doSignOut } from 'redux/actions/app';
|
|
import { selectActiveChannelClaim } from 'redux/selectors/app';
|
|
import { selectUserEmail, selectUserVerifiedEmail } from 'redux/selectors/user';
|
|
import HeaderProfileMenuButton from './view';
|
|
|
|
const select = (state) => ({
|
|
activeChannelClaim: selectActiveChannelClaim(state),
|
|
authenticated: selectUserVerifiedEmail(state),
|
|
email: selectUserEmail(state),
|
|
});
|
|
|
|
const perform = (dispatch) => ({
|
|
signOut: () => dispatch(doSignOut()),
|
|
});
|
|
|
|
export default connect(select, perform)(HeaderProfileMenuButton);
|