basic notification modal
This commit is contained in:
19
frontend-react/src/utils/notificationmodalwrapper.js
Normal file
19
frontend-react/src/utils/notificationmodalwrapper.js
Normal file
@@ -0,0 +1,19 @@
|
||||
import { connect } from "react-redux";
|
||||
import { MODAL_CLOSE, MODAL_OPEN } from "constants/actionTypes";
|
||||
|
||||
const mapStateToProps = state => {
|
||||
return {
|
||||
modal: state.modal
|
||||
};
|
||||
};
|
||||
|
||||
const mapDispatchToProps = dispatch => ({
|
||||
onModalOpen: () => dispatch({ type: MODAL_OPEN }),
|
||||
onModalClose: () => dispatch({ type: MODAL_CLOSE })
|
||||
});
|
||||
|
||||
export const notificationmodalwrapper = component =>
|
||||
connect(
|
||||
mapStateToProps,
|
||||
mapDispatchToProps
|
||||
)(component);
|
||||
Reference in New Issue
Block a user