Implement adding a user to a list from their profile (#9062)
* Add add user to list from thier profile * Fix listAdderCss
This commit is contained in:
parent
a7e3bd0300
commit
bb5558de62
62 changed files with 414 additions and 0 deletions
|
@ -23,6 +23,7 @@ export default class Header extends ImmutablePureComponent {
|
|||
onBlockDomain: PropTypes.func.isRequired,
|
||||
onUnblockDomain: PropTypes.func.isRequired,
|
||||
onEndorseToggle: PropTypes.func.isRequired,
|
||||
onAddToList: PropTypes.func.isRequired,
|
||||
hideTabs: PropTypes.bool,
|
||||
};
|
||||
|
||||
|
@ -78,6 +79,10 @@ export default class Header extends ImmutablePureComponent {
|
|||
this.props.onEndorseToggle(this.props.account);
|
||||
}
|
||||
|
||||
handleAddToList = () => {
|
||||
this.props.onAddToList(this.props.account);
|
||||
}
|
||||
|
||||
render () {
|
||||
const { account, hideTabs } = this.props;
|
||||
|
||||
|
@ -106,6 +111,7 @@ export default class Header extends ImmutablePureComponent {
|
|||
onBlockDomain={this.handleBlockDomain}
|
||||
onUnblockDomain={this.handleUnblockDomain}
|
||||
onEndorseToggle={this.handleEndorseToggle}
|
||||
onAddToList={this.handleAddToList}
|
||||
/>
|
||||
|
||||
{!hideTabs && (
|
||||
|
|
|
@ -116,6 +116,12 @@ const mapDispatchToProps = (dispatch, { intl }) => ({
|
|||
dispatch(unblockDomain(domain));
|
||||
},
|
||||
|
||||
onAddToList(account){
|
||||
dispatch(openModal('LIST_ADDER', {
|
||||
accountId: account.get('id'),
|
||||
}));
|
||||
},
|
||||
|
||||
});
|
||||
|
||||
export default injectIntl(connect(makeMapStateToProps, mapDispatchToProps)(Header));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue