const accountId = context.accountId; const widgetName = props.widgetName; const onChange = props.onChange; if (!accountId) { return "Please sign in with NEAR wallet"; } let metadata = Social.getr(`${accountId}/widget/${widgetName}/metadata`); if (metadata === null) { return "Loading"; } return ( <Widget src="mob.near/widget/MetadataEditor" props={{ initialMetadata: metadata, onChange, options: { name: { label: "Title" }, image: { label: "Icon" }, description: { label: "Description" }, tags: { label: "Tags", tagsPattern: "*/widget/metadata/tags/*", placeholder: "profile, editor, social, finance, app, image, nft", }, linktree: { links: [ { label: "Website", prefix: "https://", name: "website", }, ], }, }, }} /> );