Added messaging presets BOD-107

This commit is contained in:
Patrick Fic
2020-07-21 16:12:32 -07:00
parent 0ef4d77275
commit 7b99a2e612
21 changed files with 526 additions and 18 deletions

View File

@@ -5,10 +5,13 @@ const INITIAL_STATE = {
selectedConversationId: null,
isSending: false,
error: null,
message: null,
};
const messagingReducer = (state = INITIAL_STATE, action) => {
switch (action.type) {
case MessagingActionTypes.SET_MESSAGE:
return { ...state, message: action.payload };
case MessagingActionTypes.TOGGLE_CHAT_VISIBLE:
return {
...state,
@@ -29,6 +32,7 @@ const messagingReducer = (state = INITIAL_STATE, action) => {
case MessagingActionTypes.SEND_MESSAGE_SUCCESS:
return {
...state,
message: "",
isSending: false,
};
case MessagingActionTypes.SEND_MESSAGE_FAILURE: