lbry-desktop/ui/modal/modalRouter/index.js
infinite-persistence b5dd24ff56
ModalRouter: change dispatch map to object
Moving away from the function version to the object version. Trying to track down why the effect that closes the modal ran when the pathname did not change. My only guess is the unstable hideModal reference due to the function mapping. There is no customization needed, so the object version is preferred anyways.

`doOpenModal` isn't used, so I just removed that.
2022-05-19 23:56:34 +08:00

16 lines
477 B
JavaScript

import { connect } from 'react-redux';
import { selectModal } from 'redux/selectors/app';
import { doHideModal } from 'redux/actions/app';
import { selectError } from 'redux/selectors/notifications'; // RENAME THIS 'selectNotificationError'
import ModalRouter from './view';
const select = (state, props) => ({
modal: selectModal(state),
error: selectError(state),
});
const perform = {
hideModal: doHideModal,
};
export default connect(select, perform)(ModalRouter);