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