From c905a5db394ba2dece3e1aa37b393d4e81db4738 Mon Sep 17 00:00:00 2001 From: Natalie Bridgers Date: Wed, 15 Apr 2026 16:27:44 -0500 Subject: [PATCH] Clear pin on unmount --- js/components/src/livestream-provider/index.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/js/components/src/livestream-provider/index.tsx b/js/components/src/livestream-provider/index.tsx index 716e6e07..255c4bfc 100644 --- a/js/components/src/livestream-provider/index.tsx +++ b/js/components/src/livestream-provider/index.tsx @@ -144,6 +144,12 @@ export function PinnedCommentWatcher() { const store = getStoreFromContext(); const prevPinnedRef = useRef(null); + useEffect(() => { + return () => { + StreamNotifications.pinnedCommentDismiss(); + }; + }, []); + // Show/hide notification when pinned comment changes useEffect(() => { const currentUri = pinnedComment?.uri ?? null; -- 2.51.2