aboutsummaryrefslogtreecommitdiff
path: root/src/components/StopItem.tsx
diff options
context:
space:
mode:
authorAriel Costas Guerrero <ariel@costas.dev>2025-04-20 19:07:29 +0200
committerAriel Costas Guerrero <ariel@costas.dev>2025-04-20 19:07:29 +0200
commit340865ad234f974ec4c0afcbfb6ff06f50a11b2f (patch)
tree06b6a76b6dfc535f9091990eaaec82b50d5f851e /src/components/StopItem.tsx
parent32bc4914759845516de2b7592b05afb3c3cc5c42 (diff)
Load stops from local data files
Diffstat (limited to 'src/components/StopItem.tsx')
-rw-r--r--src/components/StopItem.tsx6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/components/StopItem.tsx b/src/components/StopItem.tsx
index 6b48899..cf9ccfc 100644
--- a/src/components/StopItem.tsx
+++ b/src/components/StopItem.tsx
@@ -1,6 +1,6 @@
import React from 'react';
import { Link } from 'react-router';
-import { Stop } from '../data/StopDataProvider';
+import StopDataProvider, { Stop } from '../data/StopDataProvider';
import LineIcon from './LineIcon';
interface StopItemProps {
@@ -8,13 +8,15 @@ interface StopItemProps {
}
const StopItem: React.FC<StopItemProps> = ({ stop }) => {
+
return (
<li className="list-item">
<Link className="list-item-link" to={`/estimates/${stop.stopId}`}>
- ({stop.stopId}) {stop.name}
+ {stop.favourite && <span className="favourite-icon">★</span>} ({stop.stopId}) {StopDataProvider.getDisplayName(stop)}
<div className="line-icons">
{stop.lines?.map(line => <LineIcon key={line} line={line} />)}
</div>
+
</Link>
</li>
);