Added updating of display name to profile. Added employees table.
This commit is contained in:
24
client/src/redux/messaging/messaging.reducer.js
Normal file
24
client/src/redux/messaging/messaging.reducer.js
Normal file
@@ -0,0 +1,24 @@
|
||||
import MessagingActionTypes from "./messaging.types";
|
||||
|
||||
const INITIAL_STATE = {
|
||||
visible: false
|
||||
};
|
||||
|
||||
const messagingReducer = (state = INITIAL_STATE, action) => {
|
||||
switch (action.type) {
|
||||
case MessagingActionTypes.TOGGLE_CHAT_VISIBLE:
|
||||
return {
|
||||
...state,
|
||||
visible: !state.visible
|
||||
};
|
||||
case MessagingActionTypes.SET_CHAT_VISIBLE:
|
||||
return {
|
||||
...state,
|
||||
visible: true
|
||||
};
|
||||
default:
|
||||
return state;
|
||||
}
|
||||
};
|
||||
|
||||
export default messagingReducer;
|
||||
Reference in New Issue
Block a user