Skip to content

Commit b745e1b

Browse files
committed
fixup! fixup! fixup! fixup! front: manchette: display waypoints added with map click
1 parent 5c61c96 commit b745e1b

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

front/src/modules/simulationResult/components/SpaceTimeChart/useGetProjectedTrainOperationalPoints.ts

+2-4
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import { STDCM_TRAIN_ID } from 'applications/stdcm/consts';
66
import {
77
osrdEditoastApi,
88
type PathProperties,
9-
type PostInfraByInfraIdPathPropertiesApiArg,
109
type TrainScheduleResult,
1110
} from 'common/api/osrdEditoastApi';
1211
import { addElementAtIndex } from 'utils/array';
@@ -37,14 +36,13 @@ const useGetProjectedTrainOperationalPoints = (
3736
useEffect(() => {
3837
const getOperationalPoints = async () => {
3938
if (infraId && trainScheduleUsedForProjection && pathfindingResult?.status === 'success') {
40-
const pathPropertiesParams: PostInfraByInfraIdPathPropertiesApiArg = {
39+
const { operational_points } = await postPathProperties({
4140
infraId,
4241
props: ['operational_points'],
4342
pathPropertiesInput: {
4443
track_section_ranges: pathfindingResult.track_section_ranges,
4544
},
46-
};
47-
const { operational_points } = await postPathProperties(pathPropertiesParams).unwrap();
45+
}).unwrap();
4846

4947
let operationalPointsWithAllWaypoints = operational_points!;
5048

0 commit comments

Comments
 (0)