Release v0.2.13: Update package-lock.json and CI config

This commit is contained in:
Joan
2025-12-30 19:16:56 +01:00
parent ee55c5f887
commit ea594f80c6
2 changed files with 9 additions and 2 deletions

View File

@@ -1,4 +1,4 @@
import { BrowserRouter as Router, Routes, Route, Navigate } from 'react-router-dom' import { HashRouter as Router, Routes, Route, Navigate } from 'react-router-dom'
import { AuthProvider } from './contexts/AuthContext' import { AuthProvider } from './contexts/AuthContext'
import { useAuth } from './hooks/useAuth' import { useAuth } from './hooks/useAuth'
import LandingPage from './components/LandingPage' import LandingPage from './components/LandingPage'

View File

@@ -1078,7 +1078,14 @@ export function useGameEngine(
useEffect(() => { useEffect(() => {
if (!token) return if (!token) return
const wsUrl = `${import.meta.env.VITE_WS_URL || 'ws://localhost:8000'}/ws/game/${token}` // Get WebSocket URL based on environment (same logic as api.ts)
const API_BASE = import.meta.env.VITE_API_URL || (
import.meta.env.PROD
? 'https://api-staging.echoesoftheash.com'
: 'http://localhost:8000'
)
const wsBase = API_BASE.replace(/^http/, 'ws')
const wsUrl = `${wsBase}/ws/game/${token}`
console.log('🔌 Connecting to WebSocket:', wsUrl) console.log('🔌 Connecting to WebSocket:', wsUrl)
const ws = new WebSocket(wsUrl) const ws = new WebSocket(wsUrl)