You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
587 B
23 lines
587 B
4 years ago
|
import { connect } from 'react-redux';
|
||
|
import * as actions from '../../../../store/actions';
|
||
|
import AddToAddressBookModal from './add-to-addressbook-modal.component';
|
||
5 years ago
|
|
||
4 years ago
|
function mapStateToProps(state) {
|
||
5 years ago
|
return {
|
||
5 years ago
|
...(state.appState.modal.modalState.props || {}),
|
||
4 years ago
|
};
|
||
5 years ago
|
}
|
||
|
|
||
4 years ago
|
function mapDispatchToProps(dispatch) {
|
||
5 years ago
|
return {
|
||
|
hideModal: () => dispatch(actions.hideModal()),
|
||
4 years ago
|
addToAddressBook: (recipient, nickname) =>
|
||
|
dispatch(actions.addToAddressBook(recipient, nickname)),
|
||
4 years ago
|
};
|
||
5 years ago
|
}
|
||
|
|
||
4 years ago
|
export default connect(
|
||
|
mapStateToProps,
|
||
|
mapDispatchToProps,
|
||
4 years ago
|
)(AddToAddressBookModal);
|