Skip to content

Commit

Permalink
front: fix results display when entering a scenario
Browse files Browse the repository at this point in the history
Some getPathProperties conditions were not in the useEffect depths, so changing these values did not update trainSimulation (which is undefined by default when entering a scenario), preventing the simulation results to be displayed

Signed-off-by: theocrsb <[email protected]>
  • Loading branch information
theocrsb committed Feb 27, 2025
1 parent a818cef commit 05dae8a
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,14 @@ const useSpeedSpaceChart = (
};

getPathProperties();
}, [pathProperties, infraId, rollingStock]);
}, [
infraId,
trainScheduleResult,
rollingStock,
pathfindingResult,
simulation?.status,
pathProperties,
]);

useEffect(() => {
if (trainScheduleResult && rollingStock && pathfindingResult && formattedPathProperties) {
Expand Down

0 comments on commit 05dae8a

Please sign in to comment.