const { handle } = props; const { getCommunity } = VM.require( "devgovgigs.near/widget/core.adapter.devhub-contract" ); const { href } = VM.require("devgovgigs.near/widget/core.lib.url"); if (!getCommunity || !href) { return <p>Loading modules...</p>; } // TODO: Why do we need to get community data again? Isn't the tag the handle... const communityData = getCommunity({ handle }); if (communityData === null) { return <div>Loading...</div>; } return ( <div style={{ maxWidth: "100%" }}> <div class="col"> <div class="d-flex w-100"> <div className="col-md-9" style={{ maxWidth: "75%" }}> <Widget src={"devgovgigs.near/widget/devhub.feature.post-search.panel"} props={{ hideHeader: true, tag: communityData.tag, communityName: communityData.name, children: ( <Widget src={ "devgovgigs.near/widget/devhub.components.molecule.PostControls" } props={{ title: "Post", href: href({ widgetSrc: "devgovgigs.near/widget/app", params: { page: "create", labels: [communityData.tag], }, }), }} /> ), recency, transactionHashes: props.transactionHashes, }} /> </div> <div class="col-md-3 container-fluid"> <Widget src={"devgovgigs.near/widget/devhub.entity.community.Sidebar"} props={{ community: communityData }} /> </div> </div> </div> </div> );