diff --git a/client/src/components/ItineraryList/ItineraryDetails.tsx b/client/src/components/ItineraryList/ItineraryDetails.tsx
index 11fe14c73fb..23e67ce9a95 100644
--- a/client/src/components/ItineraryList/ItineraryDetails.tsx
+++ b/client/src/components/ItineraryList/ItineraryDetails.tsx
@@ -10,6 +10,8 @@ export function ItineraryDetails({ tripPattern }: { tripPattern: TripPattern })
{tripPattern.legs.map((leg, i) => (
))}
+
+
Generalized cost: ¢{tripPattern.generalizedCost}
);
}
diff --git a/client/src/components/ItineraryList/ItineraryLegDetails.tsx b/client/src/components/ItineraryList/ItineraryLegDetails.tsx
index 65d790902a8..04ddc55c574 100644
--- a/client/src/components/ItineraryList/ItineraryLegDetails.tsx
+++ b/client/src/components/ItineraryList/ItineraryLegDetails.tsx
@@ -21,7 +21,8 @@ export function ItineraryLegDetails({ leg, isLast }: { leg: Leg; isLast: boolean
return (
- {formatDistance(leg.distance)}, {formatDuration(leg.duration)}
+ {formatDistance(leg.distance)}, {formatDuration(leg.duration)},{' '}
+ ¢{leg.generalizedCost}
1) {
- formatted = `${formatted}${hrs} hrs `;
+ if (hrs > 0) {
+ formatted = `${formatted}${hrs}h `;
}
- if (mins === 1) {
- formatted = `${formatted}${mins} min `;
- } else if (mins > 1) {
- formatted = `${formatted}${mins} mins `;
+ if (mins > 0) {
+ formatted = `${formatted}${mins}min `;
}
- if (secs === 1) {
- formatted = `${formatted}${secs} sec `;
- } else if (secs > 1) {
- formatted = `${formatted}${secs} secs `;
+ if (secs > 1) {
+ formatted = `${formatted}${secs}s`;
}
return formatted;