From 81663fe597978dba4dc1021dd86c8d9bd4d4d6b4 Mon Sep 17 00:00:00 2001 From: Elliot Braem <16282460+elliotBraem@users.noreply.github.com> Date: Thu, 4 Jan 2024 19:55:54 -0500 Subject: [PATCH] working feed --- src/devhub/components/organism/Feed.jsx | 9 ++++++--- src/devhub/entity/community/Announcements.jsx | 4 +++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/devhub/components/organism/Feed.jsx b/src/devhub/components/organism/Feed.jsx index 354328419..822f7da92 100644 --- a/src/devhub/components/organism/Feed.jsx +++ b/src/devhub/components/organism/Feed.jsx @@ -1,6 +1,8 @@ -const { Feed } = VM.require("${REPL_DEVS}/widget/Module.Feed"); +const { Feed } = VM.require("${REPL_DEVS}/widget/Feed"); Feed = Feed || (() => <>); +const filteredAccountIds = props.filteredAccountIds ?? []; + const GRAPHQL_ENDPOINT = props.GRAPHQL_ENDPOINT ?? "https://near-queryapi.api.pagoda.co"; @@ -85,7 +87,7 @@ return ( options: { limit: 10, order: "desc", - accountId: [`${handle}.community.${REPL_DEVHUB_CONTRACT}`], + accountId: filteredAccountIds, }, cacheOptions: { ignoreCache: true, @@ -95,6 +97,7 @@ return ( Item={(item) => ( } props={{ accountId: item.accountId, blockHeight: item.blockHeight, @@ -108,7 +111,7 @@ return ( props={{ GRAPHQL_ENDPOINT, showFlagAccountFeature: true, - ...props, + filteredAccountIds: filteredAccountIds, }} /> )} diff --git a/src/devhub/entity/community/Announcements.jsx b/src/devhub/entity/community/Announcements.jsx index 936af55d2..d66613b28 100644 --- a/src/devhub/entity/community/Announcements.jsx +++ b/src/devhub/entity/community/Announcements.jsx @@ -107,7 +107,9 @@ return ( src="${REPL_DEVHUB}/widget/devhub.components.organism.Feed" props={{ showFlagAccountFeature: true, - filteredAccountIds: `${handle}.community.${REPL_DEVHUB_CONTRACT}`, + filteredAccountIds: [ + `${handle}.community.${REPL_DEVHUB_CONTRACT}`, + ], sort: sort, }} />