const ownerId = "contribut3.near"; const accountId = props.accountId; const cid = props.cid; if (!accountId || !cid) { return "Cannot show the request page without an account ID and a CID!"; } State.init({ content: props.content ?? "requests", search: props.search ?? "", }); const entity = Near.view( ownerId, "get_entity", { account_id: accountId }, "final" ); const isAuthorized = Near.view( ownerId, "check_is_manager_or_higher", { entity_id: accountId, account_id: context.accountId }, "final" ); const contributions = Near.view( ownerId, "get_entity_contributions", { entity_id: accountId }, "final" ); const [[founder]] = (contributions ?? []).filter((contribution) => { const [_, details] = contribution; const all = [...details.history, details.current]; return all.some((detail) => detail.description === ""); }); const profile = Social.getr(`${accountId}/profile`);