2021-02-04 19:15:23 +01:00
|
|
|
import { connect } from 'react-redux';
|
|
|
|
import { hideModal } from '../../../../store/actions';
|
|
|
|
import { getSelectedIdentity } from '../../../../selectors';
|
|
|
|
import AccountModalContainer from './account-modal-container.component';
|
2019-11-24 23:41:08 +01:00
|
|
|
|
2020-11-03 00:41:28 +01:00
|
|
|
function mapStateToProps(state, ownProps) {
|
2019-11-24 23:41:08 +01:00
|
|
|
return {
|
|
|
|
selectedIdentity: ownProps.selectedIdentity || getSelectedIdentity(state),
|
2021-02-04 19:15:23 +01:00
|
|
|
};
|
2019-11-24 23:41:08 +01:00
|
|
|
}
|
|
|
|
|
2020-11-03 00:41:28 +01:00
|
|
|
function mapDispatchToProps(dispatch) {
|
2019-11-24 23:41:08 +01:00
|
|
|
return {
|
|
|
|
hideModal: () => {
|
2021-02-04 19:15:23 +01:00
|
|
|
dispatch(hideModal());
|
2019-11-24 23:41:08 +01:00
|
|
|
},
|
2021-02-04 19:15:23 +01:00
|
|
|
};
|
2019-11-24 23:41:08 +01:00
|
|
|
}
|
|
|
|
|
2020-11-03 00:41:28 +01:00
|
|
|
export default connect(
|
|
|
|
mapStateToProps,
|
|
|
|
mapDispatchToProps,
|
2021-02-04 19:15:23 +01:00
|
|
|
)(AccountModalContainer);
|