Skip to content

Commit

Permalink
working feed
Browse files Browse the repository at this point in the history
  • Loading branch information
elliotBraem committed Jan 5, 2024
1 parent f1e04c3 commit 81663fe
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
9 changes: 6 additions & 3 deletions src/devhub/components/organism/Feed.jsx
Original file line number Diff line number Diff line change
@@ -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";

Expand Down Expand Up @@ -85,7 +87,7 @@ return (
options: {
limit: 10,
order: "desc",
accountId: [`${handle}.community.${REPL_DEVHUB_CONTRACT}`],
accountId: filteredAccountIds,
},
cacheOptions: {
ignoreCache: true,
Expand All @@ -95,6 +97,7 @@ return (
Item={(item) => (
<Widget
src="${REPL_NEAR}/widget/v1.Posts.Post"
loading={<div className="w-100" style={{ height: "200px" }} />}
props={{
accountId: item.accountId,
blockHeight: item.blockHeight,
Expand All @@ -108,7 +111,7 @@ return (
props={{
GRAPHQL_ENDPOINT,
showFlagAccountFeature: true,
...props,
filteredAccountIds: filteredAccountIds,
}}
/>
)}
Expand Down
4 changes: 3 additions & 1 deletion src/devhub/entity/community/Announcements.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}}
/>
Expand Down

0 comments on commit 81663fe

Please sign in to comment.