b5dd24ff56
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.
16 lines
477 B
JavaScript
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);
|