File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed
src/app/screens/Feed/components Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 2020 "system_alerts" : " System Alerts" ,
2121 "free_bike_status" : " Free Bike Status" ,
2222 "nearby_stations" : " Nearby Stations"
23- }
23+ },
24+ "unableToDetectVersions" : " Unable to detect versions within this feed."
2425}
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ import {
2222import { displayFormattedDate } from '../../../utils/date' ;
2323import { featureChipsStyle } from '../Feed.styles' ;
2424import { sortGbfsVersions } from '../Feed.functions' ;
25+ import { WarningContentBox } from '../../../components/WarningContentBox' ;
2526
2627export interface GbfsVersionsProps {
2728 feed : GBFSFeedType ;
@@ -80,10 +81,6 @@ export default function GbfsVersions({
8081 return `https://github.com/MobilityData/gbfs/blob/v${ version } /gbfs.md#${ feature } json` ;
8182 } ;
8283
83- if ( feed ?. versions == null || feed ?. versions ?. length === 0 ) {
84- return < > </ > ;
85- }
86-
8784 return (
8885 < >
8986 < Typography
@@ -100,6 +97,10 @@ export default function GbfsVersions({
10097 justifyContent : 'flex-end' ,
10198 } }
10299 >
100+ { feed ?. versions == null ||
101+ ( feed . versions . length === 0 && (
102+ < WarningContentBox > { t ( 'unableToDetectVersions' ) } </ WarningContentBox >
103+ ) ) }
103104 { [ ...( feed ?. versions ?? [ ] ) ]
104105 . sort ( ( a , b ) => sortGbfsVersions ( a , b ) )
105106 . map ( ( item , index ) => {
You can’t perform that action at this time.
0 commit comments