From a4494ebd62ee50ee53d86c2e4841a1dca244bbf1 Mon Sep 17 00:00:00 2001 From: Alejandro Gomez Date: Tue, 10 Jan 2023 23:39:30 +0100 Subject: [PATCH] add hashtag highlight to profile description --- src/pages/ProfilePage.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pages/ProfilePage.js b/src/pages/ProfilePage.js index f988d49..1182043 100644 --- a/src/pages/ProfilePage.js +++ b/src/pages/ProfilePage.js @@ -11,7 +11,7 @@ import useProfile from "../feed/ProfileFeed"; import FollowButton from "../element/FollowButton"; import { extractLnAddress, parseId } from "../Util"; import Timeline from "../element/Timeline"; -import { extractLinks } from '../Text' +import { extractLinks, extractHashtags } from '../Text' import LNURLTip from "../element/LNURLTip"; import Nip05 from "../element/Nip05"; import Copy from "../element/Copy"; @@ -36,6 +36,7 @@ export default function ProfilePage() { const isMe = loginPubKey === id; const [showLnQr, setShowLnQr] = useState(false); const [tab, setTab] = useState(ProfileTab.Notes); + const about = extractHashtags(extractLinks([user?.about])) useEffect(() => { setTab(ProfileTab.Notes); @@ -60,7 +61,7 @@ export default function ProfilePage() { } -

{extractLinks([user?.about])}

+

{about}

{user?.website && (