a6316ce71e
## Issue 535 ## Change - Header: Use the "channel list undefined" instead of "active channel url undefined" to determine if the button should be "pending". - App: restore the use of `activeChannelClaim` instead of `activeChannelId`. In the existing design, the latter is never cleared is some situations, so the former is more accurate as it takes the current channel list into account. We might want to hide (not export) `activeChannelId` to avoid this mis-use again.
19 lines
712 B
JavaScript
19 lines
712 B
JavaScript
import { connect } from 'react-redux';
|
|
import { doSignOut } from 'redux/actions/app';
|
|
import { selectActiveChannelClaim } from 'redux/selectors/app';
|
|
import { selectMyChannelClaimIds } from 'redux/selectors/claims';
|
|
import { selectUserEmail, selectUserVerifiedEmail } from 'redux/selectors/user';
|
|
import HeaderProfileMenuButton from './view';
|
|
|
|
const select = (state) => ({
|
|
myChannelClaimIds: selectMyChannelClaimIds(state),
|
|
activeChannelClaim: selectActiveChannelClaim(state),
|
|
authenticated: selectUserVerifiedEmail(state),
|
|
email: selectUserEmail(state),
|
|
});
|
|
|
|
const perform = (dispatch) => ({
|
|
signOut: () => dispatch(doSignOut()),
|
|
});
|
|
|
|
export default connect(select, perform)(HeaderProfileMenuButton);
|