From 91fa464d95270fba17d2af1f7a62bc806004641d Mon Sep 17 00:00:00 2001 From: robonen Date: Mon, 15 Jun 2026 17:49:59 +0700 Subject: [PATCH] refactor(docs): remove unused broadcastedRef composable --- .../src/composables/broadcastedRef/index.ts | 27 ------------------- 1 file changed, 27 deletions(-) delete mode 100644 web/vue/src/composables/broadcastedRef/index.ts diff --git a/web/vue/src/composables/broadcastedRef/index.ts b/web/vue/src/composables/broadcastedRef/index.ts deleted file mode 100644 index 76c035d..0000000 --- a/web/vue/src/composables/broadcastedRef/index.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { customRef, onScopeDispose } from 'vue'; - -export function broadcastedRef(key: string, initialValue: T) { - const channel = new BroadcastChannel(key); - - onScopeDispose(channel.close); - - return customRef((track, trigger) => { - channel.onmessage = (event) => { - track(); - return event.data; - }; - - channel.postMessage(initialValue); - - return { - get() { - return initialValue; - }, - set(newValue: T) { - initialValue = newValue; - channel.postMessage(newValue); - trigger(); - }, - }; - }); -} \ No newline at end of file