Refactored job line edit modal to use redux so that it can be an independent form. Created general modals reducer to manage all modals.
This commit is contained in:
12
client/src/redux/modals/modals.actions.js
Normal file
12
client/src/redux/modals/modals.actions.js
Normal file
@@ -0,0 +1,12 @@
|
||||
import ModalsActionTypes from "./modals.types";
|
||||
|
||||
export const toggleModalVisible = modalName => ({
|
||||
type: ModalsActionTypes.TOGGLE_MODAL_VISIBLE,
|
||||
payload: modalName
|
||||
});
|
||||
|
||||
//Modal Context: {context (context object), modal(name of modal)}
|
||||
export const setModalContext = modalContext => ({
|
||||
type: ModalsActionTypes.SET_MODAL_CONTEXT,
|
||||
payload: modalContext
|
||||
});
|
||||
Reference in New Issue
Block a user