mirror of
https://github.com/tiqi-group/pydase.git
synced 2025-06-11 07:47:12 +02:00
Revert "Fix/connection toast timeout"
This commit is contained in:
@ -109,6 +109,7 @@ 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
|
||||
@ -149,11 +150,7 @@ const App = () => {
|
||||
socket.on('disconnect', () => {
|
||||
setConnectionStatus('disconnected');
|
||||
setTimeout(() => {
|
||||
// Only set "reconnecting" is the state is still "disconnected"
|
||||
// E.g. when the client has already reconnected
|
||||
setConnectionStatus((currentState) =>
|
||||
currentState === 'disconnected' ? 'reconnecting' : currentState
|
||||
);
|
||||
setConnectionStatus('reconnecting');
|
||||
}, 2000);
|
||||
});
|
||||
|
||||
|
@ -28,7 +28,9 @@ 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}>
|
||||
|
Reference in New Issue
Block a user