const { Feed } = VM.require("devs.near/widget/Module.Feed"); const { ContextMenu } = VM.require("efiz.near/widget/Module.ContextMenu"); ContextMenu = ContextMenu || (() => <></>); // make sure you have this or else it can break Feed = Feed || (() => <></>); return ( <div className="d-flex flex-column gap-1" style={{ background: "#fefefe", padding: "23px", }} > <h3> <b>Every Post</b> </h3> <Widget src="devs.near/widget/Compose" // props={{ // index: { // post: JSON.stringify([ // { // key: { // type: "post", // path: `${creatorId}/thing/${groupId}`, // }, // value: { // type: "md", // }, // }, // ]), // }, // }} /> <Feed index={[ { action: "post", key: "main", options: { limit: 10, order: "desc", accountId: props.accounts, }, cacheOptions: { ignoreCache: true, }, }, { action: "repost", key: "main", options: { limit: 10, order: "desc", accountId: props.accounts, }, cacheOptions: { ignoreCache: true, }, }, ]} Item={(p) => ( <ContextMenu Item={() => ( <Widget loading={<div className="w-100" style={{ height: "200px" }} />} src="mob.near/widget/MainPage.N.Post" // Fork and edit this props={{ accountId: p.accountId, blockHeight: p.blockHeight }} /> )} passProps={{ // PROPS THAT WILL BE PASSED TO FUNCTION doSomething: { message: "hello world" }, }} handlers={{ // FUNCTION DEFINITIONS doSomething: ({ message }) => { console.log(message); }, }} items={{ // MENU ITEM TO RENDER, WILL CALL FUNCTION WHEN CLICKED doSomething: () => ( <> <i className="menu__item__icon bi bi-x-lg" /> Do Something </> ), }} /> )} /> </div> );