Skip to content

Commit

Permalink
filter dead guilds (#2587)
Browse files Browse the repository at this point in the history
  • Loading branch information
bob0005 authored Dec 23, 2024
1 parent b07a075 commit b60f1aa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client/src/hooks/helpers/useGuilds.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { ClientComponents } from "@/dojo/createClientComponents";
import { formatTime, toHexString } from "@/ui/utils/utils";
import { ContractAddress, GuildInfo, GuildMemberInfo, GuildWhitelistInfo, ID, Player } from "@bibliothecadao/eternum";
import { useEntityQuery } from "@dojoengine/react";
import { Component, Entity, Has, HasValue, getComponentValue, runQuery } from "@dojoengine/recs";
import { Component, Entity, Has, HasValue, NotValue, getComponentValue, runQuery } from "@dojoengine/recs";
import { getEntityIdFromKeys } from "@dojoengine/utils";
import { useCallback } from "react";
import { shortString } from "starknet";
Expand Down Expand Up @@ -181,7 +181,7 @@ export const useGuilds = () => {

const useGuildQuery = () => {
const guildsRanked = useLeaderBoardStore.getState().guildsByRank;
const guilds = useEntityQuery([Has(Guild)]);
const guilds = useEntityQuery([Has(Guild), NotValue(Guild, { member_count: 0 })]);

return {
guilds: formatGuilds(
Expand Down

0 comments on commit b60f1aa

Please sign in to comment.