Skip to content

Commit 1ee3c9a

Browse files
feat: transitland and fta attribution (#1257)
1 parent ee644de commit 1ee3c9a

File tree

2 files changed

+37
-1
lines changed

2 files changed

+37
-1
lines changed

web-app/public/locales/en/feeds.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,5 +145,6 @@
145145
"viewJsonReport": "View Validation Report in JSON format"
146146
},
147147
"viewRealtimeVisualization": "View real-time visualization",
148-
"versions": "Versions"
148+
"versions": "Versions",
149+
"dataAattribution": "Transit data provided by"
149150
}

web-app/src/app/screens/Feed/index.tsx

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,41 @@ export default function Feed(): React.ReactElement {
439439
).toDateString()}`}
440440
</Typography>
441441
)}
442+
{feed.external_ids?.some((eId) => eId.source === 'tld') === true && (
443+
<Typography
444+
data-testid='transitland-attribution'
445+
variant={'caption'}
446+
width={'100%'}
447+
component={'div'}
448+
>
449+
{t('dataAattribution')}{' '}
450+
<a
451+
rel='noreferrer'
452+
target='_blank'
453+
href='https://www.transit.land/terms'
454+
>
455+
Transitland
456+
</a>
457+
</Typography>
458+
)}
459+
{feed.external_ids?.some((eId) => eId.source === 'ntd') === true && (
460+
<Typography
461+
data-testid='fta-attribution'
462+
variant={'caption'}
463+
width={'100%'}
464+
component={'div'}
465+
>
466+
{t('dataAattribution')}
467+
{' the United States '}
468+
<a
469+
rel='noreferrer'
470+
target='_blank'
471+
href='https://www.transit.dot.gov/ntd/data-product/2023-annual-database-general-transit-feed-specification-gtfs-weblinks'
472+
>
473+
National Transit Database
474+
</a>
475+
</Typography>
476+
)}
442477
</Box>
443478

444479
{feed?.data_type === 'gtfs_rt' &&

0 commit comments

Comments
 (0)