Skip to content

Commit

Permalink
fixup! fix: items load normally again
Browse files Browse the repository at this point in the history
  • Loading branch information
RasenGUY committed Dec 8, 2023
1 parent 479b55a commit 6a8c7f6
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/components/WegaGames/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ export const JoinableAndPlayableGames: React.FC<JoinableAndPlayableGamesProps> =
const { data, isLoading, isSuccess} = useGetGamesQuery({ networkId: networkId ?? defaultNetwork?.id });
const [gameIds, setGameIds] = useState<number[]>([]);
useEffect(() => {
console.log(data)
if(isSuccess && data && data?.entities) {
const dataArray = data.ids.map((id: number) => data.entities[id]) as Wega[];
const playableGames = filterPlayableGames(dataArray, userUuid);
Expand All @@ -31,7 +30,6 @@ export const JoinableAndPlayableGames: React.FC<JoinableAndPlayableGamesProps> =
const sortedGameIds = sortPlayableGames([...playableGames, ...joinableGames, ...waitingGames]).map(game => game.id);
setGameIds(sortedGameIds);
}
console.log(gameIds)
}, [data, gamesCount, isSuccess, defaultNetwork?.id]);

return !isLoading ? (<Section hdr="Join matches instantly" direction="col" tw="gap-2 mt-[35px] " { ...rest }>
Expand Down

0 comments on commit 6a8c7f6

Please sign in to comment.