From b60f1aae145e73b2d4c3e001aacb49a2d54fdcd5 Mon Sep 17 00:00:00 2001 From: Bob <80072466+bob0005@users.noreply.github.com> Date: Mon, 23 Dec 2024 16:15:05 +0100 Subject: [PATCH] filter dead guilds (#2587) --- client/src/hooks/helpers/useGuilds.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/hooks/helpers/useGuilds.tsx b/client/src/hooks/helpers/useGuilds.tsx index b197add82..5b5599698 100644 --- a/client/src/hooks/helpers/useGuilds.tsx +++ b/client/src/hooks/helpers/useGuilds.tsx @@ -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"; @@ -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(