Spaces:
Paused
Paused
Update lib/socket.ts
Browse files- lib/socket.ts +8 -8
lib/socket.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
| 1 |
-
import { io } from "socket.io-client";
|
| 2 |
-
|
| 3 |
-
// "undefined" means the URL will be computed from the `window.location` object
|
| 4 |
-
const URL = process.env.NEXT_PUBLIC_SOCKET_URL ||
|
| 5 |
-
|
| 6 |
-
export const socket = io(URL, {
|
| 7 |
-
autoConnect: false,
|
| 8 |
-
});
|
|
|
|
| 1 |
+
import { io } from "socket.io-client";
|
| 2 |
+
|
| 3 |
+
// "undefined" means the URL will be computed from the `window.location` object
|
| 4 |
+
const URL = process.env.NEXT_PUBLIC_SOCKET_URL || undefined;
|
| 5 |
+
|
| 6 |
+
export const socket = io(URL, {
|
| 7 |
+
autoConnect: false,
|
| 8 |
+
});
|