fix(post): don't render empty avatar space when image url is invalid

This commit is contained in:
plebeius
2025-10-16 23:37:58 +02:00
parent 4941ec77b5
commit e1f1f280cc
2 changed files with 4 additions and 8 deletions
+2 -4
View File
@@ -127,13 +127,11 @@ const PostInfo = ({ post, postReplyCount = 0, roles, isHidden }: PostProps) => {
</span>
{!(isDescription || isRules) && (
<>
{author?.avatar && !(deleted || removed) && !hideAvatars ? (
{author?.avatar && !(deleted || removed) && !hideAvatars && avatarImageUrl ? (
<span className={styles.authorAvatar}>
<img src={avatarImageUrl} alt='' />
</span>
) : (
' '
)}
) : null}
(ID:{' '}
{deleted ? (
t('deleted')
+2 -4
View File
@@ -118,13 +118,11 @@ const PostInfoAndMedia = ({ post, postReplyCount = 0, roles }: PostProps) => {
</span>
{!(isDescription || isRules) && (
<>
{author?.avatar && !(deleted || removed) && !hideAvatars ? (
{author?.avatar && !(deleted || removed) && !hideAvatars && avatarImageUrl ? (
<span className={styles.authorAvatar}>
<img src={avatarImageUrl} alt='' />
</span>
) : (
' '
)}
) : null}
(ID: {''}
{removed ? (
_.lowerCase(t('removed'))