fix(reply modal): do nothing when clicking another cid while modal is opened

This commit is contained in:
plebeius.eth
2024-05-08 17:13:31 +02:00
parent 1ae739eb41
commit 4fa6f60792
+1 -5
View File
@@ -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);