Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion components/StartCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ export const StartCard = React.memo<StartCardProps>(({

// Get offline mode for the tour (defaults to 'optional')
const offlineMode = getOfflineMode(tour);
const stopsCount = tour.stops.filter(item => item.type !== 'rating').length;

return (
// No fixed height. We let the content define the height, and the parent measures it.
Expand All @@ -270,7 +271,7 @@ export const StartCard = React.memo<StartCardProps>(({
</MetaItem>
<MetaItem>
<PathIcon size={18} />
<span>{tour.stops.length} {t.startCard.stops}</span>
<span>{stopsCount} {t.startCard.stops}</span>
</MetaItem>
</MetaContainer>
<Description>
Expand Down
3 changes: 2 additions & 1 deletion components/TourSelectionCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ export const TourSelectionCard = React.memo<TourSelectionCardProps>(({ tour, onC
const showImage = tourCard?.showImage !== false;
const showDescription = tourCard?.showDescription !== false;
const showMeta = tourCard?.showMeta !== false;
const stopsCount = tour.stops.filter(item => item.type !== 'rating').length;

return (
<Card
Expand All @@ -118,7 +119,7 @@ export const TourSelectionCard = React.memo<TourSelectionCardProps>(({ tour, onC
</MetaItem>
<MetaItem>
<PathIcon size={16} />
<span>{tour.stops.length} {t.startCard.stops}</span>
<span>{stopsCount} {t.startCard.stops}</span>
</MetaItem>
</MetaContainer>
)}
Expand Down