From bf3a4bee310cebae2a5af40a00569dbd734743d0 Mon Sep 17 00:00:00 2001 From: Aditya Anand M C Date: Tue, 14 May 2024 17:16:08 +0530 Subject: [PATCH] address feedback --- .../src/features/discovery/ExploreRoundsPage.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/grant-explorer/src/features/discovery/ExploreRoundsPage.tsx b/packages/grant-explorer/src/features/discovery/ExploreRoundsPage.tsx index 51e482418..135efc70b 100644 --- a/packages/grant-explorer/src/features/discovery/ExploreRoundsPage.tsx +++ b/packages/grant-explorer/src/features/discovery/ExploreRoundsPage.tsx @@ -10,6 +10,7 @@ import { RoundsFilter } from "./RoundsFilter"; import { getExplorerPageTitle } from "./utils/getExplorerPageTitle"; import { RoundsGrid } from "./RoundsGrid"; import { getEnabledChains } from "../../app/chainConfig"; +import { useMemo } from "react"; const ExploreRoundsPage = () => { const [params] = useSearchParams(); @@ -18,7 +19,7 @@ const ExploreRoundsPage = () => { // Pass the filter from the search params and build the graphql query const rounds = useFilterRounds(filter, getEnabledChains()); - const publicRounds = rounds.data?.filter(round => round.roundMetadata.roundType?.toLowerCase() !== "private"); + const publicRounds = useMemo(() => rounds.data?.filter(round => round.roundMetadata.roundType?.toLowerCase() !== "private"), [rounds]); rounds.data = publicRounds; const sectionTitle = getExplorerPageTitle(filter);