1
1
import React , { useEffect , useMemo , useState } from 'react' ;
2
2
import { PointTooltipProps , ResponsiveLine } from '@nivo/line' ;
3
3
import { useTranslation } from 'react-i18next' ;
4
- import { Comfort , RollingStock } from 'common/api/osrdEditoastApi' ;
4
+ import { RollingStockComfortType , RollingStock } from 'common/api/osrdEditoastApi' ;
5
5
import { useSelector } from 'react-redux' ;
6
6
import { getElectricalProfile , getPowerRestriction } from 'reducers/rollingstockEditor/selectors' ;
7
7
import { STANDARD_COMFORT_LEVEL , THERMAL_TRACTION_IDENTIFIER } from 'modules/rollingStock/consts' ;
@@ -13,7 +13,7 @@ type EffortCurvesModes = RollingStock['effort_curves']['modes'];
13
13
type TransformedCurves = {
14
14
[ index : string ] : {
15
15
mode : string ;
16
- comfort : Comfort ;
16
+ comfort : RollingStockComfortType ;
17
17
speeds : number [ ] ;
18
18
max_efforts : number [ ] ;
19
19
electricalProfile : string | null ;
@@ -22,7 +22,7 @@ type TransformedCurves = {
22
22
} ;
23
23
type ParsedCurves = {
24
24
color : string ;
25
- comfort : Comfort ;
25
+ comfort : RollingStockComfortType ;
26
26
data : {
27
27
x : number ;
28
28
y : number ;
@@ -63,7 +63,7 @@ const parseData = (
63
63
} ;
64
64
65
65
function LegendComfortSwitches ( props : {
66
- curvesComfortList : Comfort [ ] ;
66
+ curvesComfortList : RollingStockComfortType [ ] ;
67
67
comfortsStates : { [ key : string ] : boolean } ;
68
68
onComfortsStatesChange : ( comfort : string ) => void ;
69
69
} ) {
@@ -182,7 +182,7 @@ export default function RollingStockCurve({
182
182
hoveredElectricalParam,
183
183
} : {
184
184
data : EffortCurvesModes ;
185
- curvesComfortList : Comfort [ ] ;
185
+ curvesComfortList : RollingStockComfortType [ ] ;
186
186
isOnEditionMode ?: boolean ;
187
187
showPowerRestriction ?: boolean ;
188
188
hoveredElectricalParam ?: string | null ;
0 commit comments