mirror of
https://github.com/cheveguerra/whaticket-community.git
synced 2026-04-21 05:09:18 +00:00
improvement: change messages states to useReducer
This commit is contained in:
@@ -182,7 +182,7 @@ const reducer = (state, action) => {
|
||||
state[ticketIndex] = ticket;
|
||||
state.unshift(state.splice(ticketIndex, 1)[0]);
|
||||
} else {
|
||||
state.push(ticket);
|
||||
state.unshift(ticket);
|
||||
}
|
||||
return [...state];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user