From 743bd9b4c8312da4897297d297b95eb1a7bec6e7 Mon Sep 17 00:00:00 2001 From: "Tom (plebeius.eth)" Date: Fri, 31 May 2024 09:39:55 +0200 Subject: [PATCH] fix: hiding/blocking comments wouldn't work because useBlock takes cid, not address --- src/components/post/post-desktop/post-desktop.tsx | 2 +- .../post/post-desktop/post-menu-desktop/post-menu-desktop.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/post/post-desktop/post-desktop.tsx b/src/components/post/post-desktop/post-desktop.tsx index 526a6f13..d053f5fa 100644 --- a/src/components/post/post-desktop/post-desktop.tsx +++ b/src/components/post/post-desktop/post-desktop.tsx @@ -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); diff --git a/src/components/post/post-desktop/post-menu-desktop/post-menu-desktop.tsx b/src/components/post/post-desktop/post-menu-desktop/post-menu-desktop.tsx index 55939c44..b10d70d0 100644 --- a/src/components/post/post-desktop/post-menu-desktop/post-menu-desktop.tsx +++ b/src/components/post/post-desktop/post-menu-desktop/post-menu-desktop.tsx @@ -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();