Skip to content

Commit

Permalink
Merge pull request #641 from MobilityData/606-related-schedule-feeds-…
Browse files Browse the repository at this point in the history
…section-have-default-feed-name-for-feeds-with-no-dataset

feat: displayed GTFS Schedule feed if there's no feedname
  • Loading branch information
qcdyx authored Aug 2, 2024
2 parents 1d10113 + 94b1ea4 commit 876ea26
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions web-app/src/app/screens/Feed/AssociatedFeeds.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ const renderAssociatedGTFSFeedRow = (
}
const hasFeedName =
assocFeed.feed_name !== undefined && assocFeed.feed_name !== '';
const noLatestDataset = assocFeed.latest_dataset === undefined;
return (
<TableRow
key={assocFeed?.id}
Expand All @@ -42,9 +43,13 @@ const renderAssociatedGTFSFeedRow = (
rel='noreferrer'
style={{ display: 'contents' }}
>
{hasFeedName && (
<TableCell sx={{ paddingLeft: 0 }}>{assocFeed.feed_name}</TableCell>
)}
<TableCell sx={{ paddingLeft: 0 }}>
{!hasFeedName && noLatestDataset
? 'GTFS Schedule feed'
: hasFeedName
? assocFeed.feed_name
: ''}
</TableCell>
<TableCell
sx={{ paddingRight: 0, paddingLeft: hasFeedName ? 'initial' : 0 }}
>
Expand Down

0 comments on commit 876ea26

Please sign in to comment.