@@ -102,13 +102,13 @@ const ITINERARY_ATTRIBUTES = [
102
102
{
103
103
id : 'cost' ,
104
104
order : 2 ,
105
- render : ( itinerary , options ) => {
105
+ render : ( itinerary , options , defaultFare = 'regular' ) => {
106
106
return (
107
107
< FormattedNumber
108
108
currency = { options . currency }
109
109
currencyDisplay = 'narrowSymbol'
110
110
style = 'currency'
111
- value = { getTotalFare ( itinerary , options . configCosts ) / 100 }
111
+ value = { getTotalFare ( itinerary , options . configCosts , defaultFare ) / 100 }
112
112
/>
113
113
)
114
114
}
@@ -166,6 +166,7 @@ class DefaultItinerary extends NarrativeItinerary {
166
166
active,
167
167
configCosts,
168
168
currency,
169
+ defaultFare,
169
170
expanded,
170
171
itinerary,
171
172
LegIcon,
@@ -214,7 +215,7 @@ class DefaultItinerary extends NarrativeItinerary {
214
215
options . currency = currency
215
216
return (
216
217
< li className = { `${ attribute . id } ${ isSelected ? ' main' : '' } ` } key = { attribute . id } >
217
- { attribute . render ( itinerary , options ) }
218
+ { attribute . render ( itinerary , options , defaultFare ) }
218
219
</ li >
219
220
)
220
221
} )
@@ -245,7 +246,8 @@ const mapStateToProps = (state, ownProps) => {
245
246
// The configured (ambient) currency is needed for rendering the cost
246
247
// of itineraries whether they include a fare or not, in which case
247
248
// we show $0.00 or its equivalent in the configured currency and selected locale.
248
- currency : state . otp . config . localization ?. currency || 'USD'
249
+ currency : state . otp . config . localization ?. currency || 'USD' ,
250
+ defaultFare : state . otp . config . itinerary ?. defaultFare
249
251
}
250
252
}
251
253
0 commit comments