From e51cdd89afc08274ca622e18b8127feca29e90a3 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 6 Nov 2025 22:49:47 +0000 Subject: Add gallery components and improve search functionality Co-authored-by: arielcostas <94913521+arielcostas@users.noreply.github.com> --- src/frontend/app/components/StopGalleryItem.tsx | 38 +++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 src/frontend/app/components/StopGalleryItem.tsx (limited to 'src/frontend/app/components/StopGalleryItem.tsx') diff --git a/src/frontend/app/components/StopGalleryItem.tsx b/src/frontend/app/components/StopGalleryItem.tsx new file mode 100644 index 0000000..24d92a2 --- /dev/null +++ b/src/frontend/app/components/StopGalleryItem.tsx @@ -0,0 +1,38 @@ +import React from "react"; +import { Link } from "react-router"; +import { type Stop } from "../data/StopDataProvider"; +import LineIcon from "./LineIcon"; +import { useApp } from "../AppContext"; +import StopDataProvider from "../data/StopDataProvider"; + +interface StopGalleryItemProps { + stop: Stop; +} + +const StopGalleryItem: React.FC = ({ stop }) => { + const { region } = useApp(); + + return ( +
+ +
+ {stop.favourite && } + ({stop.stopId}) +
+
+ {StopDataProvider.getDisplayName(region, stop)} +
+
+ {stop.lines?.slice(0, 3).map((line) => ( + + ))} + {stop.lines && stop.lines.length > 3 && ( + +{stop.lines.length - 3} + )} +
+ +
+ ); +}; + +export default StopGalleryItem; -- cgit v1.3