Skip to content

Commit e79278d

Browse files
fix(components/narriative): support hiding calories
1 parent 5d74a41 commit e79278d

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

Diff for: example-config.yml

+2
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,8 @@ itinerary:
308308
disableMetroSeperatorDot: false
309309
# Shows the duration of a leg below the leg in the metro itinerary summary
310310
showLegDurations: false
311+
# Allows calorie counts to be hidden
312+
displayCalories: true
311313

312314
# The transitOperators key is a list of transit operators that can be used to
313315
# order transit agencies when sorting by route. Also, this can optionally

Diff for: lib/components/narrative/connected-trip-details.js

+4
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ const mapStateToProps = (state) => {
1616
const { itinerary } = state.otp.config
1717
return {
1818
defaultFareKey: itinerary?.defaultFareKey || undefined,
19+
displayCalories:
20+
typeof itinerary?.displayCalories === 'boolean'
21+
? itinerary?.displayCalories
22+
: undefined,
1923
fareDetailsLayout: itinerary?.fareDetailsLayout || undefined,
2024
fareKeyNameMap: itinerary?.fareKeyNameMap || {}
2125
}

0 commit comments

Comments
 (0)