Skip to content

Commit

Permalink
front: update electrical profile set id in store when loading scenario
Browse files Browse the repository at this point in the history
  • Loading branch information
Castavo committed Aug 23, 2024
1 parent 187b095 commit cf9cf25
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ type SimulationParams = {

const useScenario = () => {
const dispatch = useAppDispatch();
const { updateInfraID, updateTimetableID } = useOsrdConfActions();
const { updateInfraID, updateTimetableID, updateElectricalProfileSetId } = useOsrdConfActions();

const {
projectId: urlProjectId,
Expand Down Expand Up @@ -52,10 +52,12 @@ const useScenario = () => {
if (scenario) {
dispatch(updateTimetableID(scenario.timetable_id));
dispatch(updateInfraID(scenario.infra_id));
dispatch(updateElectricalProfileSetId(scenario.electrical_profile_set_id));
} else {
dispatch(updateTimetableID(undefined));
dispatch(updateInfraID(undefined));
dispatch(updateTrainIdUsedForProjection(undefined));
dispatch(updateElectricalProfileSetId(undefined));
}
}, [scenario]);

Expand Down

0 comments on commit cf9cf25

Please sign in to comment.