Skip to content

Commit

Permalink
build out
Browse files Browse the repository at this point in the history
  • Loading branch information
elliotBraem committed Jan 25, 2024
1 parent 0e3c551 commit 92d8426
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions apps/buildbox/widget/page/submit.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -195,21 +195,21 @@ const handleCheckboxChange = (track) => {
};

const handleSubmit = () => {
console.log("submitting");
// const { title, description, image, backgroundImage, category, tags } = v;
const id = normalize(title);
const path = `${context.accountId}/${app}/${type}/${id}`;

Social.set(
{
post: {
[app]: JSON.stringify({
text: `I've just created a hackathon! #build #${app} #${type} \n\n[EMBED](buildbox.near/widget/embed?${type}=${path})\n\n`,
main: JSON.stringify({
text: `I've just created a ${type}! #build #${app} #${type} \n\n[EMBED](buildbox.near/widget/post.embed?${type}=${path})\n\n`,
image: "",
type: "md",
metadata: {},
}),
},
index: {
post: JSON.stringify({ key: app, value: { type: "md" } }),
},
[app]: {
[type]: {
[id]: {
Expand All @@ -228,12 +228,20 @@ const handleSubmit = () => {
image,
backgroundImage,
type: `every.near/type/${type}`, // for later
category,
tags,
},
},
},
},
buildbox: {
hackathon: {
abstractionhacks: {
submissions: {
[`${context.accountId}-${normalize(title)}`]: "",
},
},
},
},
},
{
force: true,
Expand Down

0 comments on commit 92d8426

Please sign in to comment.