CLAUDE: Fix connection status indicator showing disconnected while playing
Use useWebSocket composable directly as source of truth for connection status instead of gameStore.isConnected which could get out of sync. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
4cb8e3f6c4
commit
3a91a5d477
@ -67,15 +67,12 @@
|
|||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useAuthStore } from '~/store/auth'
|
import { useAuthStore } from '~/store/auth'
|
||||||
import { useGameStore } from '~/store/game'
|
import { useWebSocket } from '~/composables/useWebSocket'
|
||||||
|
|
||||||
const authStore = useAuthStore()
|
const authStore = useAuthStore()
|
||||||
const gameStore = useGameStore()
|
|
||||||
|
|
||||||
// WebSocket connection status
|
// WebSocket connection status - use composable directly as source of truth
|
||||||
const isConnected = computed(() => gameStore.isConnected)
|
const { isConnected } = useWebSocket()
|
||||||
|
|
||||||
// Auth is initialized by the auth plugin automatically
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user