@@ -91,6 +91,8 @@ export const FuelPayload: FC = () => {
91
91
plannedFuel && setFuel ( metric ? plannedFuel * 2.205 : plannedFuel ) ;
92
92
} ;
93
93
94
+ const unitString = metric ? "kg" : "lbs" ;
95
+
94
96
return (
95
97
< Container >
96
98
< ChartWidgetContainer >
@@ -114,8 +116,8 @@ export const FuelPayload: FC = () => {
114
116
< Label > Actual</ Label >
115
117
< ItemGroup style = { itemGroupStyle } spacing = { 0 } >
116
118
< InfoColumn label = "Pax" value = { `${ Math . round ( pax ) } /363` } />
117
- < InfoColumn label = "Cargo" value = { `${ metric ? Math . round ( cargo / 2.205 ) : cargo } kg ` } />
118
- < InfoColumn label = "ZFW" value = { `${ metric ? Math . round ( zfw / 2.205 ) : zfw } kg ` } />
119
+ < InfoColumn label = "Cargo" value = { `${ metric ? Math . round ( cargo / 2.205 ) : cargo } ${ unitString } ` } />
120
+ < InfoColumn label = "ZFW" value = { `${ metric ? Math . round ( zfw / 2.205 ) : zfw } ${ unitString } ` } />
119
121
< InfoColumn label = "CG" value = { `${ cg . toFixed ( 2 ) } %` } />
120
122
</ ItemGroup >
121
123
</ ItemGroupContainer >
@@ -125,14 +127,14 @@ export const FuelPayload: FC = () => {
125
127
< InputColumn label = "Pax" placeholder = "0/363" value = { plannedPax } setter = { setPlannedPax } filterFn = { paxInputFilter } />
126
128
< InputColumn
127
129
label = "Cargo"
128
- placeholder = { `0 ${ metric ? "kg" : "lbs" } ` }
130
+ placeholder = { `0 ${ unitString } ` }
129
131
value = { plannedCargo }
130
132
setter = { setPlannedCargo }
131
133
filterFn = { weightInputFilter }
132
134
/>
133
135
< InputColumn
134
136
label = "ZFW"
135
- placeholder = { `0 ${ metric ? "kg" : "lbs" } ` }
137
+ placeholder = { `0 ${ unitString } ` }
136
138
value = { plannedZfw }
137
139
setter = { setPlannedZfw }
138
140
filterFn = { weightInputFilter }
@@ -144,14 +146,14 @@ export const FuelPayload: FC = () => {
144
146
< WeightInputContainer >
145
147
< ItemGroupContainer >
146
148
< ItemGroup style = { itemGroupStyle } spacing = { 0 } >
147
- < InfoColumn label = "Fuel" value = { `${ metric ? Math . round ( fuel / 2.205 ) : fuel } ${ metric ? "kg" : "lbs" } ` } />
149
+ < InfoColumn label = "Fuel" value = { `${ metric ? Math . round ( fuel / 2.205 ) : fuel } ${ unitString } ` } />
148
150
</ ItemGroup >
149
151
</ ItemGroupContainer >
150
152
< ItemGroupContainer >
151
153
< ItemGroup style = { itemGroupStyle } spacing = { 0 } >
152
154
< InputColumn
153
155
label = "Fuel"
154
- placeholder = { `0 ${ metric ? "kg" : "lbs" } ` }
156
+ placeholder = { `0 ${ unitString } ` }
155
157
value = { plannedFuel }
156
158
setter = { setPlannedFuel }
157
159
filterFn = { weightInputFilter }
0 commit comments