Skip to content

Commit

Permalink
fix: hashtag
Browse files Browse the repository at this point in the history
  • Loading branch information
elliotBraem committed Feb 3, 2024
1 parent d94b8c4 commit 00747f1
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
15 changes: 14 additions & 1 deletion apps/buildbox/widget/page/feed.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { Feed } = VM.require("devs.near/widget/Module.Feed") || {
const { Feed } = VM.require("devs.near/widget/Feed") || {
Feed: () => <></>,
};

Expand All @@ -15,6 +15,19 @@ return (
cacheOptions: {
ignoreCache: true,
},
required: true
},
{
action: "hashtag",
key: "hack",
options: {
limit: 10,
order: "desc",
},
cacheOptions: {
ignoreCache: true,
},
required: true
},
]}
Item={(p) => (
Expand Down
10 changes: 10 additions & 0 deletions apps/buildbox/widget/page/submit.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ const handleCheckboxChange = (track) => {
const handleSubmit = () => {
const id = normalize(title);
const path = `${context.accountId}/${app}/${type}/${id}`;
const postItem = { type: "social", path: `${context.accountId}/post/main` };

Social.set(
{
Expand All @@ -210,6 +211,15 @@ const handleSubmit = () => {
},
index: {
post: JSON.stringify({ key: "main", value: { type: "md" } }),
hashtag: JSON.stringify([
{
key: "abstraction",
value: postItem,
},
{ key: "hack", value: postItem },
{ key: "build", value: postItem },
{ key: "project", value: postItem },
]),
},
buildbox: {
[type]: {
Expand Down

0 comments on commit 00747f1

Please sign in to comment.