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

21 lines
528 B
JavaScript
Raw Permalink Normal View History

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