From 4fa6f6079216b6e74c9fd1cf0616ea243bb91c75 Mon Sep 17 00:00:00 2001 From: "plebeius.eth" Date: Wed, 8 May 2024 17:13:31 +0200 Subject: [PATCH] fix(reply modal): do nothing when clicking another cid while modal is opened --- src/hooks/use-reply-modal.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/hooks/use-reply-modal.ts b/src/hooks/use-reply-modal.ts index 90def82c..11fc3045 100644 --- a/src/hooks/use-reply-modal.ts +++ b/src/hooks/use-reply-modal.ts @@ -21,11 +21,7 @@ const useReplyModal = () => { setScrollY(currentScrollY); } if (activeCid && activeCid !== cid) { - closeModal(); - setTimeout(() => { - setActiveCid(cid); - setShowReplyModal(true); - }, 0); // minimal timeout to allow for state reset + return; } else if (!activeCid) { setActiveCid(cid); setShowReplyModal(true);