mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
fix: hiding/blocking comments wouldn't work because useBlock takes cid, not address
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user