fix production login issue
Build & Push / Pipeline Tests (push) Successful in 1m53s
Test / Type Check (all packages) (push) Successful in 56s
Build & Push / Build & Push Docker Image (push) Successful in 4m19s
Test / API Unit Tests (push) Successful in 1m17s
Test / Homepage Unit Tests (push) Successful in 49s
Test / Carplace Unit Tests (push) Successful in 46s
Test / Admin Unit Tests (push) Successful in 42s
Test / Dashboard Unit Tests (push) Successful in 44s
Test / API Integration Tests (push) Successful in 1m7s

This commit is contained in:
root
2026-07-29 00:48:32 -04:00
parent a665c942d2
commit 9e2fc050be
7 changed files with 78 additions and 4 deletions
@@ -5,7 +5,7 @@ import { Bell, Search, Settings } from 'lucide-react'
import { usePathname, useRouter, useSearchParams } from 'next/navigation'
import { useState, useEffect } from 'react'
import { io } from 'socket.io-client'
import { EMPLOYEE_PROFILE_KEY, apiFetch, resolveApiOrigin } from '@/lib/api'
import { EMPLOYEE_PROFILE_KEY, apiFetch, resolveRealtimeSocketTarget } from '@/lib/api'
import { useDashboardI18n } from '@/components/I18nProvider'
import { toDashboardAppPath } from '@/lib/dashboardPaths'
@@ -76,11 +76,12 @@ export default function TopBar() {
useEffect(() => {
if (!socketEnabled) return
const socketOrigin = resolveApiOrigin()
if (!socketOrigin) return
const socketTarget = resolveRealtimeSocketTarget()
if (!socketTarget) return
const socket = io(socketOrigin, {
const socket = io(socketTarget.origin, {
autoConnect: false,
path: socketTarget.path,
withCredentials: true,
reconnectionAttempts: 3,
timeout: 5000,