Browse Source

frontend shenanigans

main
Stian Fredrik Aune 2 years ago
parent
commit
2acd04a5ca
  1. 9
      webui-react/src/pages/runtime/ProgramBoi.tsx

9
webui-react/src/pages/runtime/ProgramBoi.tsx

@ -54,7 +54,10 @@ function calculateToNext(
}
}
throw new Error("Illegal state");
return {
current: 0,
max: 1,
}
}
function programReducer(state: ProgressState, change: ProgressChange) {
@ -91,10 +94,6 @@ function programReducer(state: ProgressState, change: ProgressChange) {
steps[currentIndex].actualDuration = diffLinearValues(lastValue, lastTransition);
currentIndex += 1;
lastTransition = lastValue;
if (currentIndex < steps.length) {
toNext = calculateToNext(steps[currentIndex], lastValue, lastTransition);
}
}
}
}

Loading…
Cancel
Save