Merge pull request #62 from tiqi-group/fix/connection_toast_timeout

Fix/connection toast timeout
This commit is contained in:
Mose Müller 2023-11-03 09:18:13 +01:00 committed by GitHub
commit fccd5a7c36
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 13 additions and 12 deletions

View File

@ -109,7 +109,6 @@ const reducer = (state: State, action: Action): State => {
throw new Error();
}
};
const App = () => {
const [state, dispatch] = useReducer(reducer, null);
const stateRef = useRef(state); // Declare a reference to hold the current state
@ -150,7 +149,11 @@ const App = () => {
socket.on('disconnect', () => {
setConnectionStatus('disconnected');
setTimeout(() => {
setConnectionStatus('reconnecting');
// Only set "reconnecting" is the state is still "disconnected"
// E.g. when the client has already reconnected
setConnectionStatus((currentState) =>
currentState === 'disconnected' ? 'reconnecting' : currentState
);
}, 2000);
});

View File

@ -28,9 +28,7 @@ export const DataServiceComponent = React.memo(
if (name) {
fullAccessPath = parentPath.concat('.' + name);
}
console.log(fullAccessPath);
const id = getIdFromFullAccessPath(fullAccessPath);
console.log(id);
return (
<div className="dataServiceComponent" id={id}>

View File

@ -1,13 +1,13 @@
{
"files": {
"main.css": "/static/css/main.c444b055.css",
"main.js": "/static/js/main.964bc334.js",
"main.js": "/static/js/main.16698eff.js",
"index.html": "/index.html",
"main.c444b055.css.map": "/static/css/main.c444b055.css.map",
"main.964bc334.js.map": "/static/js/main.964bc334.js.map"
"main.16698eff.js.map": "/static/js/main.16698eff.js.map"
},
"entrypoints": [
"static/css/main.c444b055.css",
"static/js/main.964bc334.js"
"static/js/main.16698eff.js"
]
}

View File

@ -1 +1 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site displaying a pydase UI."/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json"/><title>pydase App</title><script defer="defer" src="/static/js/main.964bc334.js"></script><link href="/static/css/main.c444b055.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site displaying a pydase UI."/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json"/><title>pydase App</title><script defer="defer" src="/static/js/main.16698eff.js"></script><link href="/static/css/main.c444b055.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long