MentionNode: show the username, not the full acct

This commit is contained in:
Alex Gleason 2023-10-13 17:22:45 -05:00
parent 964ba8c758
commit 5aacfe299a
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7

View file

@ -76,6 +76,7 @@ class MentionNode extends DecoratorNode<JSX.Element> {
decorate(): JSX.Element { decorate(): JSX.Element {
const acct = this.__acct; const acct = this.__acct;
const username = acct.split('@')[0];
return ( return (
<button <button
@ -84,7 +85,7 @@ class MentionNode extends DecoratorNode<JSX.Element> {
title={`@${acct}`} title={`@${acct}`}
dir='ltr' dir='ltr'
> >
@{acct} @{username}
</button> </button>
); );
} }