Skip to content

Commit

Permalink
refactor: space added for readability
Browse files Browse the repository at this point in the history
  • Loading branch information
nichgalzin committed Jun 5, 2024
1 parent 1c28629 commit df996f5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions context/conversationStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,30 @@ export default function conversationReducer(
case 'SET_ALL_CONVERSATIONS':
console.log('SET_ALL_CONVERSATIONS');
return { ...state, allConversations: action.payload };

case 'SET_CURRENT_CONVERSATION':
return { ...state, currentConversation: action.payload };

case 'SET_SHOW_CONVERSATIONS_LIST':
return { ...state, showConversationsList: action.payload };

case 'SET_CURRENT_USER_ID':
return { ...state, currentUserId: action.payload };

case 'ADD_NEW_CONVERSATION':
return {
...state,
allConversations: [action.payload, ...state.allConversations],
};

case 'DELETE_CONVERSATION':
return {
...state,
allConversations: state.allConversations.filter(
(conversation) => conversation.id !== action.payload
),
};

default:
return state;
}
Expand Down

0 comments on commit df996f5

Please sign in to comment.