Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | 3x 1x | import { Button } from "@wintermuted/ui-react";
import React from "react";
import { Link } from "react-router-dom";
import { RouteBookmark } from "../../../api/localstorage/routeBookmarks";
interface Props {
route: RouteBookmark;
onRemove?: (routeId: number) => void;
}
export default function BookmarkedRouteItem({ route, onRemove }: Props) {
return (
<li className="bookmark-stop-wrapper">
<Link to={`/lines/${route.route}`}>
Route {route.route}: {route.desc || "Transit route"}
</Link>
{onRemove && (
<Button
onClick={() => onRemove(route.route)}
aria-label={`Remove Route ${route.route} from bookmarks`}
>
Remove
</Button>
)}
</li>
);
}
|