aboutsummaryrefslogtreecommitdiff
path: root/src/frontend/app/components/StopItem.tsx
diff options
context:
space:
mode:
authorAriel Costas Guerrero <ariel@costas.dev>2025-10-21 17:38:01 +0200
committerAriel Costas Guerrero <ariel@costas.dev>2025-10-21 17:38:01 +0200
commit12ecc97b07093f3cac6567c70ff75d57b429c674 (patch)
treecf4ec0abe4e1d20c01c62e0fc04af5eaa885e881 /src/frontend/app/components/StopItem.tsx
parent67c1dd5cb0025235c29ebd1f1706e5c17392dbff (diff)
Implement new Santiago region (WIP)
Diffstat (limited to 'src/frontend/app/components/StopItem.tsx')
-rw-r--r--src/frontend/app/components/StopItem.tsx7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/frontend/app/components/StopItem.tsx b/src/frontend/app/components/StopItem.tsx
index b781eb9..7d89d7d 100644
--- a/src/frontend/app/components/StopItem.tsx
+++ b/src/frontend/app/components/StopItem.tsx
@@ -2,19 +2,22 @@ import React from "react";
import { Link } from "react-router";
import StopDataProvider, { type Stop } from "../data/StopDataProvider";
import LineIcon from "./LineIcon";
+import { useApp } from "../AppContext";
interface StopItemProps {
stop: Stop;
}
const StopItem: React.FC<StopItemProps> = ({ stop }) => {
+ const { region } = useApp();
+
return (
<li className="list-item">
<Link className="list-item-link" to={`/estimates/${stop.stopId}`}>
{stop.favourite && <span className="favourite-icon">★</span>} (
- {stop.stopId}) {StopDataProvider.getDisplayName(stop)}
+ {stop.stopId}) {StopDataProvider.getDisplayName(region, stop)}
<div className="line-icons">
- {stop.lines?.map((line) => <LineIcon key={line} line={line} />)}
+ {stop.lines?.map((line) => <LineIcon key={line} line={line} region={region} />)}
</div>
</Link>
</li>