mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
fix(post): don't render empty avatar space when image url is invalid
This commit is contained in:
@@ -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')
|
||||
|
||||
@@ -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'))
|
||||
|
||||
Reference in New Issue
Block a user