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

18 lines
588 B
JavaScript
Raw 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 'redux/selectors/notifications'; // RENAME THIS 'selectNotificationError'
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)),
hideModal: (props) => dispatch(doHideModal(props)),
});
export default connect(select, perform)(ModalRouter);