forked from Kieran/snort
add hashtag highlight to profile description
This commit is contained in:
parent
f84710d8f1
commit
a4494ebd62
@ -11,7 +11,7 @@ import useProfile from "../feed/ProfileFeed";
|
|||||||
import FollowButton from "../element/FollowButton";
|
import FollowButton from "../element/FollowButton";
|
||||||
import { extractLnAddress, parseId } from "../Util";
|
import { extractLnAddress, parseId } from "../Util";
|
||||||
import Timeline from "../element/Timeline";
|
import Timeline from "../element/Timeline";
|
||||||
import { extractLinks } from '../Text'
|
import { extractLinks, extractHashtags } from '../Text'
|
||||||
import LNURLTip from "../element/LNURLTip";
|
import LNURLTip from "../element/LNURLTip";
|
||||||
import Nip05 from "../element/Nip05";
|
import Nip05 from "../element/Nip05";
|
||||||
import Copy from "../element/Copy";
|
import Copy from "../element/Copy";
|
||||||
@ -36,6 +36,7 @@ export default function ProfilePage() {
|
|||||||
const isMe = loginPubKey === id;
|
const isMe = loginPubKey === id;
|
||||||
const [showLnQr, setShowLnQr] = useState(false);
|
const [showLnQr, setShowLnQr] = useState(false);
|
||||||
const [tab, setTab] = useState(ProfileTab.Notes);
|
const [tab, setTab] = useState(ProfileTab.Notes);
|
||||||
|
const about = extractHashtags(extractLinks([user?.about]))
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setTab(ProfileTab.Notes);
|
setTab(ProfileTab.Notes);
|
||||||
@ -60,7 +61,7 @@ export default function ProfilePage() {
|
|||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<p>{extractLinks([user?.about])}</p>
|
<p>{about}</p>
|
||||||
|
|
||||||
{user?.website && (
|
{user?.website && (
|
||||||
<div className="website f-ellipsis">
|
<div className="website f-ellipsis">
|
||||||
|
Loading…
Reference in New Issue
Block a user