2017-12-21 22:08:54 +01:00
|
|
|
import { connect } from 'react-redux';
|
2018-10-29 18:23:53 +01:00
|
|
|
import { selectModal } from 'redux/selectors/app';
|
2019-12-18 06:27:08 +01:00
|
|
|
import { doOpenModal, doHideModal } from 'redux/actions/app';
|
2019-04-03 06:17:00 +02:00
|
|
|
import { selectError } from 'lbry-redux';
|
2017-12-21 22:08:54 +01:00
|
|
|
import ModalRouter from './view';
|
2017-08-18 19:09:40 +02:00
|
|
|
|
2019-03-28 17:53:13 +01:00
|
|
|
const select = (state, props) => ({
|
2018-10-29 18:23:53 +01:00
|
|
|
modal: selectModal(state),
|
|
|
|
error: selectError(state),
|
2017-08-18 19:09:40 +02:00
|
|
|
});
|
|
|
|
|
|
|
|
const perform = dispatch => ({
|
2018-11-28 18:40:52 +01:00
|
|
|
openModal: props => dispatch(doOpenModal(props)),
|
2019-12-18 06:27:08 +01:00
|
|
|
hideModal: props => dispatch(doHideModal(props)),
|
2017-08-18 19:09:40 +02:00
|
|
|
});
|
|
|
|
|
2018-09-24 05:44:42 +02:00
|
|
|
export default connect(
|
|
|
|
select,
|
|
|
|
perform
|
|
|
|
)(ModalRouter);
|