From 7ebc58a63f008cf34aa87ac7f74f699122c593f4 Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Mon, 9 Mar 2026 09:24:53 -0500 Subject: [PATCH] clean up --- web/src/api/ws.ts | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/web/src/api/ws.ts b/web/src/api/ws.ts index d4cb2fd32..845ad1fa6 100644 --- a/web/src/api/ws.ts +++ b/web/src/api/ws.ts @@ -205,13 +205,7 @@ function applyCameraActivity(payload: string) { } } -// --------------------------------------------------------------------------- // Hooks -// --------------------------------------------------------------------------- - -/** - * Get the send function for publishing WS messages. - */ export function useWsUpdate(): WsSend { const send = useContext(WsSendContext); if (!send) { @@ -220,12 +214,10 @@ export function useWsUpdate(): WsSend { return send; } -/** - * Subscribe to a single WS topic with proper bail-out. - * Only re-renders when the topic's value changes (Object.is comparison). - * Uses useSyncExternalStore — zero useEffect, so no PassiveMask flags - * propagate through the fiber tree. - */ +// Subscribe to a single WS topic with proper bail-out. +// Only re-renders when the topic's value changes (Object.is comparison). +// Uses useSyncExternalStore — zero useEffect, so no PassiveMask flags +// propagate through the fiber tree. export function useWs(watchTopic: string, publishTopic: string) { const payload = useSyncExternalStore( useCallback(