Skip to content

Commit

Permalink
Update author-sidebar.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
plebeius-eth committed Feb 26, 2024
1 parent 5f9ac0d commit ae4bb58
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/author-sidebar/author-sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
useAuthorAvatar,
useAuthorComments,
useBlock,
useComment,
// useSubplebbits,
} from '@plebbit/plebbit-react-hooks';
// import { getShortAddress } from '@plebbit/plebbit-js';
Expand Down Expand Up @@ -62,8 +63,8 @@ const AuthorSidebar = () => {
const { authorAddress, commentCid } = useParams() || {};
const { blocked, unblock, block } = useBlock({ address: authorAddress });

const author = useAuthor({ commentCid, authorAddress });
const { imageUrl } = useAuthorAvatar({ author });
const comment = useComment({ commentCid });
const { imageUrl } = useAuthorAvatar({ author: comment?.author });

const isInAuthorView = isAuthorView(location.pathname);
const isInProfileView = isProfileView(location.pathname);
Expand Down

0 comments on commit ae4bb58

Please sign in to comment.