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