Updated the SocketUtil.js
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
import { io } from 'socket.io-client';
|
||||
|
||||
const URL = process.env.NODE_ENV === 'production' ? "https://tools-api.gnmyt.dev/" : "http://localhost:7182/";
|
||||
const URL = process.env.NODE_ENV === 'production' ? (localStorage.getItem("url") || "https://tools-api.gnmyt.dev/")
|
||||
: "http://localhost:7182/";
|
||||
|
||||
export const createConnection = (type) => {
|
||||
const socket = io(URL, {autoConnect: false});
|
||||
|
Reference in New Issue
Block a user