diff --git a/src/common/badges-dashboard/Badge.jsx b/src/common/badges-dashboard/Badge.jsx index c655353915..fd956a2a02 100644 --- a/src/common/badges-dashboard/Badge.jsx +++ b/src/common/badges-dashboard/Badge.jsx @@ -11,7 +11,7 @@ const Badge = ({ badge, selectionChanged, readonly = false, showtext = true }) = /> ) : ( -
+
@@ -20,8 +20,8 @@ const Badge = ({ badge, selectionChanged, readonly = false, showtext = true }) = class="relative px-2 py-4 rounded-lg leading-none flex items-center divide-x divide-gray-600 w-full transition duration-1000 group-hover:shadow-md group-hover:drop-shadow-xl" onClick={() => selectionChanged()} > -
-
+
+
- - {showtext &&
{badge.level}
} +
+ {showtext &&
{badge.level}
} +
diff --git a/src/common/badges-dashboard/BadgeDetails.jsx b/src/common/badges-dashboard/BadgeDetails.jsx index bff5e9fe1e..893bf60b19 100644 --- a/src/common/badges-dashboard/BadgeDetails.jsx +++ b/src/common/badges-dashboard/BadgeDetails.jsx @@ -2,6 +2,16 @@ import Badge from './Badge'; import './badge.css'; const BadgeDetails = ({ badge, onClose }) => { + const makeClickableLinks = (badge) => { + const linkPattern = /(\w+)\s?\((https?:\/\/[^)]+)\)/g; + + const descriptionWithLinks = badge.description.replace(linkPattern, (match, name, url) => { + return `${name}`; + }); + + return ; + }; + return (

- {badge.description} + {makeClickableLinks(badge)}