diff --git a/src/devhub/components/molecule/BadgeDetails.jsx b/src/devhub/components/molecule/BadgeDetails.jsx new file mode 100644 index 000000000..c3a8c2d27 --- /dev/null +++ b/src/devhub/components/molecule/BadgeDetails.jsx @@ -0,0 +1,78 @@ +const nearDevGovBadgesContractId = "neardevgov.near"; + +let badgeId, ownerAccountId; +if (props.tokenId) { + let [_badgeId, _ownerAccountId] = props.tokenId.split(":", 2); + badgeId = _badgeId; + ownerAccountId = _ownerAccountId; +} else { + badgeId = props.badgeId; +} + +if (!badgeId) { + return ( + <> + Please, provide
badgeId
or
tokenId
to the + DevGovBadgeDetails component + + ); +} + +let badgeMetadata = + props.badgeMetadata ?? + Near.view(nearDevGovBadgesContractId, "get_badge", { + badge_id: badgeId, + }).badge_metadata; + +if (!badgeMetadata) { + return <>Loading...; +} + +return ( + <> +
+
+
+ +
+
+
+
+
+
+
+

+ {badgeMetadata.title} +

+
+
+
+
+ Awarded to + {badgeMetadata.copies} + developers +
+
+
+ +
+
+
+
+
+ +); diff --git a/src/devhub/components/molecule/MarkdownViewer.jsx b/src/devhub/components/molecule/MarkdownViewer.jsx index e53b6b37a..ace6662f9 100644 --- a/src/devhub/components/molecule/MarkdownViewer.jsx +++ b/src/devhub/components/molecule/MarkdownViewer.jsx @@ -43,7 +43,7 @@ const renderMention = ((accountId) => ( {
{inner} + + + +); diff --git a/src/devhub/entity/community/Teams.jsx b/src/devhub/entity/community/Teams.jsx index 7d099569e..e5bf76376 100644 --- a/src/devhub/entity/community/Teams.jsx +++ b/src/devhub/entity/community/Teams.jsx @@ -33,7 +33,7 @@ const UserList = ({ name, users }) => ( style={{ fontWeight: 500 }} > diff --git a/src/devhub/entity/post/Post.jsx b/src/devhub/entity/post/Post.jsx index dbddc77bc..700c26507 100644 --- a/src/devhub/entity/post/Post.jsx +++ b/src/devhub/entity/post/Post.jsx @@ -648,7 +648,7 @@ const postExtra =
Supervisor:{" "}
@@ -721,6 +721,12 @@ const clampedContent = needClamp ? contentArray.slice(0, 3).join("\n") : snapshot.description; +const SeeMore = styled.a` + cursor: pointer; + color: #00b774 !important; + font-weight: bold; +`; + // Should make sure the posts under the currently top viewed post are limited in size. const descriptionArea = isUnderPost ? ( @@ -749,13 +755,9 @@ const descriptionArea = isUnderPost ? (
{state.clamp ? ( ) : ( <> diff --git a/src/devhub/page/admin/moderatorsTab.jsx b/src/devhub/page/admin/moderatorsTab.jsx index 5c83dce84..c98534efc 100644 --- a/src/devhub/page/admin/moderatorsTab.jsx +++ b/src/devhub/page/admin/moderatorsTab.jsx @@ -108,7 +108,7 @@ return ( moderators.map((child) => (