aboutsummaryrefslogtreecommitdiff
path: root/src/frontend/app/components/StopGalleryItem.tsx
diff options
context:
space:
mode:
authorAriel Costas Guerrero <ariel@costas.dev>2025-12-28 18:21:17 +0100
committerAriel Costas Guerrero <ariel@costas.dev>2025-12-28 18:21:30 +0100
commitb2ddc0ef449ccbe7f0d33e539ccdfc1baef04e2c (patch)
treee097f7e990a610762d8c4297f82147c57b4635fd /src/frontend/app/components/StopGalleryItem.tsx
parent4fb2fe683b75464917dec4b1a0aaee63830f3b9a (diff)
Get favourite stops from OTP instead of pre-generated file
Diffstat (limited to 'src/frontend/app/components/StopGalleryItem.tsx')
-rw-r--r--src/frontend/app/components/StopGalleryItem.tsx11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/frontend/app/components/StopGalleryItem.tsx b/src/frontend/app/components/StopGalleryItem.tsx
index bf60697..de369d8 100644
--- a/src/frontend/app/components/StopGalleryItem.tsx
+++ b/src/frontend/app/components/StopGalleryItem.tsx
@@ -26,7 +26,7 @@ const StopGalleryItem: React.FC<StopGalleryItemProps> = ({ stop }) => {
<span className="text-yellow-500 text-base">★</span>
)}
<span className="text-xs text-gray-600 dark:text-gray-400 font-medium">
- ({stop.stopId})
+ ({stop.stopCode || stop.stopId})
</span>
</div>
<div
@@ -41,8 +41,13 @@ const StopGalleryItem: React.FC<StopGalleryItemProps> = ({ stop }) => {
{StopDataProvider.getDisplayName(stop)}
</div>
<div className="flex flex-wrap gap-1 items-center">
- {stop.lines?.slice(0, 5).map((line) => (
- <LineIcon key={line} line={line} />
+ {stop.lines?.slice(0, 5).map((lineObj) => (
+ <LineIcon
+ key={lineObj.line}
+ line={lineObj.line}
+ colour={lineObj.colour}
+ textColour={lineObj.textColour}
+ />
))}
{stop.lines && stop.lines.length > 5 && (
<span className="text-xs text-gray-600 dark:text-gray-400 font-medium px-1.5 py-0.5 bg-gray-200 dark:bg-gray-700 rounded">