Commit 0b1fad65 authored by krysent's avatar krysent

timeout

parent e3673625
......@@ -22,10 +22,11 @@ import { message } from "antd";
const { NODE_ENV } = process.env;
const websocketUrl =
NODE_ENV == "development"
? "http://192.168.40.41:7001" : 'http://192.168.40.41:7001'
// : `${window.location.protocol == "http:" ? "ws" : "wss"}://${
// window.location.host
// }`;
? "http://192.168.40.41:7001"
: "http://192.168.40.41:7001";
// : `${window.location.protocol == "http:" ? "ws" : "wss"}://${
// window.location.host
// }`;
let socket;
export default (second) => {
const ref = useRef(null);
......@@ -63,7 +64,6 @@ export default (second) => {
console.log("socketIO", data);
setsocketType(data?.wsMsgModel);
});
}, []);
useAsyncEffect(() => {
if (!isFullscreen) {
......@@ -169,6 +169,7 @@ export default (second) => {
});
useEffect(() => {
setTimeout(() => {
switch (socketType) {
case "INDEX_BOARD_INSTORE":
InstoreDataFetch.run();
......@@ -197,6 +198,7 @@ export default (second) => {
default:
return;
}
}, 1000);
}, [socketType]);
return (
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment