Skip to content

Commit

Permalink
feat: display newly terminated agendas at the top of the list
Browse files Browse the repository at this point in the history
  • Loading branch information
lunikai committed Mar 20, 2024
1 parent a15e9b0 commit 7fef470
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/web/src/services/agenda.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ socket.on("agenda.voted", ({ id, user, voters }) => {
socket.on("agenda.terminated", terminatedAgenda => {
useAgenda.setState(state => ({
agendas: [
...state.agendas.filter(agenda => agenda.id !== terminatedAgenda.id),
terminatedAgenda,
...state.agendas.filter(agenda => agenda.id !== terminatedAgenda.id),
],
}));
});
Expand Down

0 comments on commit 7fef470

Please sign in to comment.