Skip to content

Commit

Permalink
feat(next/web): exclude current ticket in recent tickets
Browse files Browse the repository at this point in the history
  • Loading branch information
sdjdd committed Nov 24, 2023
1 parent 8a17932 commit b8cb538
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ export function RecentTickets({ className, ticketId, userId }: RecentTicketsProp
queryOptions: {
keepPreviousData: true,
staleTime: 1000 * 60,
select: (data) => ({
...data,
// 排除当前工单
tickets: data.tickets.filter((ticket) => ticket.id !== ticketId),
}),
},
});

Expand Down

0 comments on commit b8cb538

Please sign in to comment.