From 02caab317cb293f36f70caea116c560910339c13 Mon Sep 17 00:00:00 2001 From: austinkelsay Date: Sun, 20 Apr 2025 14:41:27 -0500 Subject: [PATCH] capture zapRef current fo cleanup in ZapThreadsWrapper --- src/components/ZapThreadsWrapper.js | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/components/ZapThreadsWrapper.js b/src/components/ZapThreadsWrapper.js index 1b129b7..e4c36f8 100644 --- a/src/components/ZapThreadsWrapper.js +++ b/src/components/ZapThreadsWrapper.js @@ -9,6 +9,9 @@ const ZapThreadsWrapper = ({ anchor, user, relays, disable, className, isAuthori if (!isAuthorized) { return; } + + // Store the current value of zapRef to use in the cleanup function + const currentZapRef = zapRef.current; // Create a new