mirror of
https://github.com/plebbit/seedit.git
synced 2026-02-13 07:21:05 -05:00
style(post): trim displayName before shorting it to remove white spaces
This commit is contained in:
@@ -34,7 +34,7 @@ const PostAuthor = ({ authorAddress, authorRole, cid, displayName, index, shortA
|
||||
const isAuthorModerator = authorRole === 'moderator';
|
||||
const moderatorClass = `${isAuthorOwner ? styles.owner : isAuthorAdmin ? styles.admin : isAuthorModerator ? styles.moderator : ''}`;
|
||||
const authorRoleInitial = (isAuthorOwner && 'O') || (isAuthorAdmin && 'A') || (isAuthorModerator && 'M') || '';
|
||||
const shortDisplayName = displayName?.length > 20 ? displayName?.slice(0, 20) + '...' : displayName;
|
||||
const shortDisplayName = displayName?.trim().length > 20 ? displayName?.trim().slice(0, 20).trim() + '...' : displayName?.trim();
|
||||
|
||||
return (
|
||||
<>
|
||||
|
||||
Reference in New Issue
Block a user