Skip to content

Commit

Permalink
fix season table
Browse files Browse the repository at this point in the history
  • Loading branch information
starknetdev committed Jan 3, 2025
1 parent 9486270 commit 3b1e2a2
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions ui/src/app/components/leaderboard/SeasonTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,13 @@ const SeasonTable = ({
});

const gameIds = useMemo(() => {
if (!tournamentGames?.tournamentTournamentStartIdsModelModels?.edges) {
if (!tournamentGames?.lsTournamentsV0TournamentGameModels?.edges) {
return [];
}

return tournamentGames.tournamentTournamentStartIdsModelModels.edges
.flatMap((edge: any) => edge.node.game_ids)
.filter(Boolean)
.map((id: any) => parseInt(id, 10));
return tournamentGames.lsTournamentsV0TournamentGameModels.edges.map(
(edge: any) => Number(edge.node.game_id)
);
}, [tournamentGames]);

const adventurersByXPdata = useCustomQuery(
Expand All @@ -66,8 +65,6 @@ const SeasonTable = ({

const totalPages = Math.ceil(adventurers.length / itemsPerPage);

console.log(adventurers);

const handleRowSelected = async (adventurerId: number) => {
try {
setProfile(adventurerId);
Expand Down

0 comments on commit 3b1e2a2

Please sign in to comment.