diff options
Diffstat (limited to 'src/components/StopItem.tsx')
| -rw-r--r-- | src/components/StopItem.tsx | 6 |
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> ); |
