@@ -7,10 +7,15 @@ import type {
7
7
} from 'applications/operationalStudies/types' ;
8
8
import type { TrackSection } from 'common/api/osrdEditoastApi' ;
9
9
import type { IntervalItem } from 'common/IntervalsEditor/types' ;
10
- import { useOsrdConfActions } from 'common/osrdContext' ;
11
10
import getTrackLengthCumulativeSums from 'modules/pathfinding/helpers/getTrackLengthCumulativeSums' ;
12
11
import { createCutAtPathStep } from 'modules/powerRestriction/helpers/createPathStep' ;
13
- import type { OperationalStudiesConfSliceActions } from 'reducers/osrdconf/operationalStudiesConf' ;
12
+ import {
13
+ upsertPowerRestrictionRanges ,
14
+ deletePowerRestrictionRanges ,
15
+ cutPowerRestrictionRanges ,
16
+ resizeSegmentBeginInput ,
17
+ resizeSegmentEndInput ,
18
+ } from 'reducers/osrdconf/operationalStudiesConf' ;
14
19
import type { PathStep } from 'reducers/osrdconf/types' ;
15
20
import { useAppDispatch } from 'store' ;
16
21
@@ -43,14 +48,6 @@ const usePowerRestrictionSelectorBehaviours = ({
43
48
44
49
const { getTrackSectionsByIds } = useScenarioContext ( ) ;
45
50
46
- const {
47
- upsertPowerRestrictionRanges,
48
- cutPowerRestrictionRanges,
49
- deletePowerRestrictionRanges,
50
- resizeSegmentEndInput,
51
- resizeSegmentBeginInput,
52
- } = useOsrdConfActions ( ) as OperationalStudiesConfSliceActions ;
53
-
54
51
const [ trackSectionsById , setTrackSectionsById ] = useState < Record < string , TrackSection > > ( { } ) ;
55
52
56
53
/** Cumulative sums of the trackSections' length on path (in mm) */
0 commit comments