diff options
| author | Ariel Costas Guerrero <ariel@costas.dev> | 2025-11-30 20:49:48 +0100 |
|---|---|---|
| committer | Ariel Costas Guerrero <ariel@costas.dev> | 2025-11-30 20:49:48 +0100 |
| commit | a68ba30716062b265f85c4be078a736c7135d7bc (patch) | |
| tree | dd079a2d3860349402ad5b614659fedcb90c2b99 /src/frontend/app/components/StopGalleryItem.tsx | |
| parent | cee521142a4e0673b155d97c3e4825b7fec1987f (diff) | |
Refactor StopMap and Settings components; replace region config usage with REGION_DATA, update StopDataProvider calls, and improve UI elements. Remove unused timetable files and add Tailwind CSS support.
Diffstat (limited to 'src/frontend/app/components/StopGalleryItem.tsx')
| -rw-r--r-- | src/frontend/app/components/StopGalleryItem.tsx | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/frontend/app/components/StopGalleryItem.tsx b/src/frontend/app/components/StopGalleryItem.tsx index b32661a..72a13e5 100644 --- a/src/frontend/app/components/StopGalleryItem.tsx +++ b/src/frontend/app/components/StopGalleryItem.tsx @@ -1,30 +1,26 @@ import React from "react"; import { Link } from "react-router"; -import { type Stop } from "../data/StopDataProvider"; +import StopDataProvider, { 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<StopGalleryItemProps> = ({ stop }) => { - const { region } = useApp(); - return ( <div className="gallery-item"> - <Link className="gallery-item-link" to={`/estimates/${stop.stopId}`}> + <Link className="gallery-item-link" to={`/stops/${stop.stopId}`}> <div className="gallery-item-header"> {stop.favourite && <span className="favourite-icon">★</span>} <span className="gallery-item-code">({stop.stopId})</span> </div> <div className="gallery-item-name"> - {StopDataProvider.getDisplayName(region, stop)} + {StopDataProvider.getDisplayName(stop)} </div> <div className="gallery-item-lines"> {stop.lines?.slice(0, 5).map((line) => ( - <LineIcon key={line} line={line} region={region} /> + <LineIcon key={line} line={line} /> ))} {stop.lines && stop.lines.length > 5 && ( <span className="more-lines">+{stop.lines.length - 5}</span> |
