lbry-desktop/ui/modal/modalRouter/index.js

21 lines
528 B
JavaScript
Raw Normal View History

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