const profilePic = props.profilePic ?? context.profilePic; const tokens = profilePic.split(":"); const img = profilePic.startsWith("http://") || profilePic.startsWith("https://") ? ( <img className="rounded w-100 h-100" style={{ objectFit: "cover" }} src={`https://i.near.social/thumbnail/${profilePic}`} alt="profile image" /> ) : ( <Widget src="root.near/widget/NFT" props={{ contractId: tokens[0], tokenId: tokens[1] }} /> ); return ( <div> <div className="profile-image float-start me-2" style={{ width: "3em", height: "3em" }} > {img} </div> </div> );