Skip to content

Commit 0ae4e9b

Browse files
committed
better note deduplication
1 parent d33c459 commit 0ae4e9b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/components/ticketmodal.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ export const TicketModal: React.FC<TicketModalType> = (
3232

3333
const nav = useNavigate();
3434

35-
const distinctNums: number[] = [];
35+
const distinctNums: string[] = [];
3636
let distinctTickets: Ticket[] = [];
3737
tickets.forEach((ticket) => {
38-
if (distinctNums.includes(ticket.ticket)) return;
39-
distinctNums.push(ticket.ticket);
38+
if (distinctNums.includes(`${ticket.roundId}-${ticket.ticket}`)) return;
39+
distinctNums.push(`${ticket.roundId}-${ticket.ticket}`);
4040
distinctTickets.push(ticket);
4141
});
4242

src/components/userLookup.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ const UserTickets = (props: { ckey: string }) => {
439439
if (page == 1) {
440440
setErrored(true);
441441
} else {
442-
setPage(1);
442+
setPage(page - 1);
443443
}
444444
return;
445445
}

0 commit comments

Comments
 (0)