Skip to content

Commit

Permalink
Fix issue with attendee UI when a new ticket is added
Browse files Browse the repository at this point in the history
Signed-off-by: Tomás Castillo <[email protected]>
  • Loading branch information
tomrndom committed Dec 23, 2024
1 parent 7042e8c commit 71022b7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/reducers/attendees/attendee-reducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,14 @@ const attendeeReducer = (state = DEFAULT_STATE, action = {}) => {
return { ...state };
}
case TICKET_ADDED: {
const newTicket = payload.response;
const newOrder = payload.response;
const newTicket = newOrder.tickets[0];
return {
...state,
entity: {
...state.entity,
tickets: [...state.entity.tickets, newTicket]
tickets: [...state.entity.tickets, newTicket],
orders: [...state.entity.orders, newOrder]
}
};
}
Expand Down

0 comments on commit 71022b7

Please sign in to comment.