fix socket

This commit is contained in:
nkhangg 2025-03-17 14:35:23 +07:00
parent 6cf2cd4de4
commit efd8cd1fe8
1 changed files with 1 additions and 1 deletions

View File

@ -6,7 +6,7 @@ import { WorkingPage } from '../components/dashboard';
import { IBid, IWebBid } from '../system/type';
// Dùng singleton để giữ kết nối WebSocket khi chuyển trang
const socket = io('http://localhost:4000', {
const socket = io(import.meta.env.VITE_SOCKET_URL, {
autoConnect: true, // Tránh tự động kết nối khi import file
transports: ['websocket'], // Chỉ dùng WebSocket để giảm độ trễ
});