added seperate users for backend events
This commit is contained in:
18
web/vue-app/src/components/BackendEventsListener.vue
Normal file
18
web/vue-app/src/components/BackendEventsListener.vue
Normal file
@@ -0,0 +1,18 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, watch } from 'vue'
|
||||
import { useBackendEvents } from '@/common/backendEvents'
|
||||
import { currentUserId } from '@/stores/auth'
|
||||
|
||||
const userId = ref(currentUserId.value)
|
||||
|
||||
watch(currentUserId, (id) => {
|
||||
userId.value = id
|
||||
})
|
||||
|
||||
// Always call useBackendEvents in setup, passing the reactive userId
|
||||
useBackendEvents(userId)
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div></div>
|
||||
</template>
|
||||
Reference in New Issue
Block a user