/* INCLUDE: "common.jsx" */ const nearDevGovGigsContractAccountId = props.nearDevGovGigsContractAccountId || (context.widgetSrc ?? "devgovgigs.near").split("/", 1)[0]; const nearDevGovGigsWidgetsAccountId = props.nearDevGovGigsWidgetsAccountId || (context.widgetSrc ?? "devgovgigs.near").split("/", 1)[0]; function widget(widgetName, widgetProps, key) { widgetProps = { ...widgetProps, nearDevGovGigsContractAccountId: props.nearDevGovGigsContractAccountId, nearDevGovGigsWidgetsAccountId: props.nearDevGovGigsWidgetsAccountId, referral: props.referral, }; return ( <Widget src={`${nearDevGovGigsWidgetsAccountId}/widget/gigs-board.${widgetName}`} props={widgetProps} key={key} /> ); } function href(widgetName, linkProps) { linkProps = { ...linkProps }; if (props.nearDevGovGigsContractAccountId) { linkProps.nearDevGovGigsContractAccountId = props.nearDevGovGigsContractAccountId; } if (props.nearDevGovGigsWidgetsAccountId) { linkProps.nearDevGovGigsWidgetsAccountId = props.nearDevGovGigsWidgetsAccountId; } if (props.referral) { linkProps.referral = props.referral; } const linkPropsQuery = Object.entries(linkProps) .map(([key, value]) => `${key}=${value}`) .join("&"); return `#/${nearDevGovGigsWidgetsAccountId}/widget/gigs-board.pages.${widgetName}${ linkPropsQuery ? "?" : "" }${linkPropsQuery}`; } /* END_INCLUDE: "common.jsx" */ const Banner = styled.div` { height: 62px; background: #181818; margin-top: -24px; overflow: hidden !important; padding: 16px 20px; img { height: 30px; } margin-bottom: 25px; } `; return ( <> <Banner className="d-flex justify-content-between"> <a href={href("Feed")}> <img src="https://ipfs.near.social/ipfs/bafkreibjsn3gswlcc5mvgkfv7ady2lzkd2htm55l472suarbd34qryh2uy"></img> </a> <div> <a href="https://www.neardevgov.org/blog/near-developer-dao" class="text-white">Developer DAO</a> <div class="btn-group" role="group"> <button class="btn btn-outline-secondary rounded-circle" type="button" style="width: 30px; height: 30px; padding: 6px 0px; border-width: 0.5px; line-height: 0px;" data-bs-toggle="dropdown" aria-expanded="false"> <i class="bi bi-question-lg"></i> </button> <ul class="dropdown-menu dropdown-menu-end"> <li> <a target="_blank" class="dropdown-item" href="https://github.com/near/devgigsboard-widgets/issues/new?assignees=&labels=bug&template=bug_report.md&title="> Report a bug </a> </li> <li> <a target="_blank" class="dropdown-item" href="https://github.com/near/devgigsboard-widgets/issues/new?assignees=&labels=enhancement&template=feature-request.md&title="> Suggest an improvement </a> </li> </ul> </div> </div> </Banner> </> );