fix: hiding/blocking comments wouldn't work because useBlock takes cid, not address

This commit is contained in:
Tom (plebeius.eth)
2024-05-31 09:39:55 +02:00
parent 6609d00e82
commit 743bd9b4c8
2 changed files with 2 additions and 2 deletions
@@ -221,7 +221,7 @@ const PostDesktop = ({ openReplyModal, post, roles, showAllReplies }: PostProps)
const isInPendingPostView = isPendingPostView(location.pathname, params);
const isInPostPageView = isPostPageView(location.pathname, params);
const { blocked, unblock, block } = useBlock({ address: cid });
const { blocked, unblock, block } = useBlock({ cid });
const isHidden = blocked && !isInPostPageView;
const replies = useReplies(post);
@@ -101,7 +101,7 @@ const PostMenuDesktop = ({ post }: { post: Comment }) => {
const { thumbnail, type, url } = commentMediaInfo || {};
const [menuBtnRotated, setMenuBtnRotated] = useState(false);
const { blocked, unblock, block } = useBlock({ address: cid });
const { blocked, unblock, block } = useBlock({ cid });
const location = useLocation();
const params = useParams();