🔧 Added a hostname generator

This commit is contained in:
2021-10-20 14:38:12 -07:00
parent f341529e6c
commit 7531d56c6a
3 changed files with 42 additions and 13 deletions

View File

@@ -8,9 +8,7 @@ import { success } from "react-notification-system-redux";
const WebSocketContext = createContext(null);
export const WebSocketProvider = ({ children }): ReactElement => {
const dispatch = useDispatch();
const socketHost =
`http://${process.env.DOCKER_HOST}:8051` || SOCKET_BASE_URI;
const socket: Socket = io(socketHost);
const socket: Socket = io(SOCKET_BASE_URI);
socket.on("connect", () => {
dispatch({