const accountId = context.accountId; const accountId2 = props.accountId ?? "**"; const data = Social.keys(`${accountId}/post/poll_question`, "final", { return_type: "History", }); if (!accountId) { return "Please sign in with NEAR wallet to add a new blog entry"; } initState({ question: props.question, yes: 0, no: 0, }); const entry = { question: state.question, yes: state.yes, no: state.no, }; const handleChange = (event) => { State.update({ content: event.target.value }); }; return ( <div className="row mb-3"> <Widget src="silkking.near/widget/PollQuestion" props={{ meme: hasMeme ? meme : undefined }} /> <InfiniteScroll> <div> <h4>Question</h4> </div> <div className="mb-2">{entry.question}</div> <div> <CommitButton data={{ post: { entry: { question: entry.question, yes: entry.yes + 1, no: entry.no, }, }, }} > Yes </CommitButton> <CommitButton data={{ post: { entry: { question: entry.question, yes: entry.yes, no: entry.no + 1, }, }, }} > No </CommitButton> </div> </InfiniteScroll> </div> );