diff --git a/src/components/post-desktop/post-desktop.tsx b/src/components/post-desktop/post-desktop.tsx index a450b925..f6436f48 100644 --- a/src/components/post-desktop/post-desktop.tsx +++ b/src/components/post-desktop/post-desktop.tsx @@ -1,7 +1,7 @@ import { useEffect, useRef, useState } from 'react'; import { Trans, useTranslation } from 'react-i18next'; import { Link, useLocation, useParams } from 'react-router-dom'; -import { Comment, useAccount, useComment, useEditedComment } from '@plebbit/plebbit-react-hooks'; +import { Comment, useAccount, useAuthorAvatar, useComment, useEditedComment } from '@plebbit/plebbit-react-hooks'; import Plebbit from '@plebbit/plebbit-js/dist/browser/index.js'; import styles from '../../views/post/post.module.css'; import { getCommentMediaInfo, getDisplayMediaInfoType, getHasThumbnail } from '../../lib/utils/media-utils'; @@ -54,6 +54,7 @@ const PostInfo = ({ openReplyModal, post, postReplyCount = 0, roles, isHidden }: const stateString = useStateString(post); const isReply = parentCid; const { showOmittedReplies } = useShowOmittedReplies(); + const { imageUrl: avatarImageUrl } = useAuthorAvatar({ author }); const params = useParams(); const location = useLocation(); @@ -99,6 +100,13 @@ const PostInfo = ({ openReplyModal, post, postReplyCount = 0, roles, isHidden }: {!(isDescription || isRules) && ( <> + {isReply && author?.avatar && ( + } + content={avatarImageUrl?.toString() || ''} + showTooltip={!!avatarImageUrl} + /> + )} (u/ {!(isDescription || isRules) && ( <> + {isReply && author?.avatar && ( + } + content={avatarImageUrl?.toString() || ''} + showTooltip={!!avatarImageUrl} + /> + )} (u/