Skip to content

Commit

Permalink
better note deduplication
Browse files Browse the repository at this point in the history
  • Loading branch information
harryob committed Nov 4, 2024
1 parent d33c459 commit 0ae4e9b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/components/ticketmodal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ export const TicketModal: React.FC<TicketModalType> = (

const nav = useNavigate();

const distinctNums: number[] = [];
const distinctNums: string[] = [];
let distinctTickets: Ticket[] = [];
tickets.forEach((ticket) => {
if (distinctNums.includes(ticket.ticket)) return;
distinctNums.push(ticket.ticket);
if (distinctNums.includes(`${ticket.roundId}-${ticket.ticket}`)) return;
distinctNums.push(`${ticket.roundId}-${ticket.ticket}`);
distinctTickets.push(ticket);
});

Expand Down
2 changes: 1 addition & 1 deletion src/components/userLookup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ const UserTickets = (props: { ckey: string }) => {
if (page == 1) {
setErrored(true);
} else {
setPage(1);
setPage(page - 1);
}
return;
}
Expand Down

0 comments on commit 0ae4e9b

Please sign in to comment.