File tree Expand file tree Collapse file tree 3 files changed +20
-8
lines changed
packages/trip-details/src Expand file tree Collapse file tree 3 files changed +20
-8
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ import { Transfer } from "@styled-icons/boxicons-regular/Transfer";
77
88import { boldText , renderFare } from "./utils" ;
99
10- import { FareDetailsProps , FareTableLayout , FareTableText } from "./types" ;
10+ import { FareLegTableProps , FareTableLayout , FareTableText } from "./types" ;
1111
1212// Load the default messages.
1313import defaultEnglishMessages from "../i18n/en-US.yml" ;
@@ -180,10 +180,10 @@ const FareTypeTable = ({
180180
181181const FareLegDetails = ( {
182182 layout,
183+ legs,
183184 transitFareDetails,
184- transitFares,
185- legs
186- } : FareDetailsProps ) : JSX . Element => {
185+ transitFares
186+ } : FareLegTableProps ) : JSX . Element => {
187187 const fareKeys = Object . keys ( transitFareDetails ) ;
188188
189189 const legsWithFares = legs
Original file line number Diff line number Diff line change @@ -173,10 +173,10 @@ export function TripDetails({
173173 { fareDetailsLayout ? (
174174 // Show full ƒare details by leg
175175 < FareLegTable
176- transitFares = { transitFares }
177- transitFareDetails = { fareDetails }
178- legs = { itinerary . legs }
179176 layout = { fareDetailsLayout }
177+ legs = { itinerary . legs }
178+ transitFareDetails = { fareDetails }
179+ transitFares = { transitFares }
180180 />
181181 ) : (
182182 // Just show the fares for each payment type
@@ -276,7 +276,13 @@ export function TripDetails({
276276 < TripDetail
277277 // Any custom description for the transit fare needs to be handled by the slot.
278278 description = {
279- FareDetails && < FareDetails transitFares = { transitFares } />
279+ FareDetails && (
280+ < FareDetails
281+ maxTNCFare = { maxTNCFare }
282+ minTNCFare = { minTNCFare }
283+ transitFares = { transitFares }
284+ />
285+ )
280286 }
281287 icon = { < MoneyBillAlt size = { 17 } /> }
282288 summary = { fare }
Original file line number Diff line number Diff line change @@ -34,6 +34,12 @@ export interface TransitFareData {
3434}
3535
3636export interface FareDetailsProps {
37+ maxTNCFare : number ;
38+ minTNCFare : number ;
39+ transitFares : TransitFareData ;
40+ }
41+
42+ export interface FareLegTableProps {
3743 layout ?: FareTableLayout [ ] ;
3844 legs ?: Leg [ ] ;
3945 transitFareDetails ?: FareDetails ;
You can’t perform that action at this time.
0 commit comments