diff options
author | Sunil Shetye | 2025-06-19 18:00:04 +0530 |
---|---|---|
committer | Sunil Shetye | 2025-06-19 18:00:04 +0530 |
commit | 15d81a732306e63b4c748d4b0f19f01ffd9bd7d3 (patch) | |
tree | 4cdd13826f3df6c799c8a405ebf08df7ea285fae | |
parent | 9751241627d1b04a8fc028ae8be12ab913cc451d (diff) | |
download | Common-Interface-Project-15d81a732306e63b4c748d4b0f19f01ffd9bd7d3.tar.gz Common-Interface-Project-15d81a732306e63b4c748d4b0f19f01ffd9bd7d3.tar.bz2 Common-Interface-Project-15d81a732306e63b4c748d4b0f19f01ffd9bd7d3.zip |
cleanup
-rw-r--r-- | blocks/eda-frontend/src/components/SchematicEditor/SimulationScreen.js | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/blocks/eda-frontend/src/components/SchematicEditor/SimulationScreen.js b/blocks/eda-frontend/src/components/SchematicEditor/SimulationScreen.js index 5b15ad1f..f6fe47e5 100644 --- a/blocks/eda-frontend/src/components/SchematicEditor/SimulationScreen.js +++ b/blocks/eda-frontend/src/components/SchematicEditor/SimulationScreen.js @@ -615,34 +615,34 @@ export default function SimulationScreen ({ open, close }) { .get(url) .then((res) => { switch (res.data.state) { - case 'PENDING': - case 'STARTED': - case 'RETRY': - setIsResult(false) - timeoutRef.current = setTimeout(() => simulationResult(url, streamingUrl, 10000), timeout) - break - - case 'STREAMING': - case 'SUCCESS': - streamSimulationResult(streamingUrl) - setIsResult(true) - dispatch(setResultGraph({})) - if (timeoutRef.current !== null) { - clearTimeout(timeoutRef.current) - timeoutRef.current = null - } - break - - case 'FAILURE': - case 'CANCELED': - setIsResult(true) - dispatch(setErrorMessage(res.data.details)) - setGraphStatusDone() - if (timeoutRef.current !== null) { - clearTimeout(timeoutRef.current) - timeoutRef.current = null - } - break + case 'PENDING': + case 'STARTED': + case 'RETRY': + setIsResult(false) + timeoutRef.current = setTimeout(() => simulationResult(url, streamingUrl, 10000), timeout) + break + + case 'STREAMING': + case 'SUCCESS': + streamSimulationResult(streamingUrl) + setIsResult(true) + dispatch(setResultGraph({})) + if (timeoutRef.current !== null) { + clearTimeout(timeoutRef.current) + timeoutRef.current = null + } + break + + case 'FAILURE': + case 'CANCELED': + setIsResult(true) + dispatch(setErrorMessage(res.data.details)) + setGraphStatusDone() + if (timeoutRef.current !== null) { + clearTimeout(timeoutRef.current) + timeoutRef.current = null + } + break default: console.log('unhandled case', res) |