diff --git a/src/components/RouteCard.tsx b/src/components/RouteCard.tsx index 2ac9b951..4adcac21 100644 --- a/src/components/RouteCard.tsx +++ b/src/components/RouteCard.tsx @@ -13,13 +13,10 @@ import type { Route, RouteSegments } from '~/types' import { reverseGeocode } from '~/map' -type RouteOptionsProps = { - route?: Route; -} - const [showRouteOptionsCard, setShowRouteOptionsCard] = createSignal(false) +const [currentCardRoute, setCurrentCardRoute] = createSignal(undefined) -const RouteOptionsCard: Component = (props) => { +const RouteOptionsCard: Component = () => { const [isMdOrLarger, setIsMdOrLarger] = createSignal(false) // listen isMdOrLarger @@ -49,7 +46,7 @@ const RouteOptionsCard: Component = (props) => { 'transform translate-y-full': !isMdOrLarger() && !showRouteOptionsCard(), }}>
event.stopPropagation()}> - +
@@ -89,6 +86,7 @@ const RouteHeader = (props: { route?: RouteSegments }) => { const handleMoreOptionsClick = (event: MouseEvent) => { event.stopPropagation() setShowRouteOptionsCard(true) + setCurrentCardRoute(props.route) } return ( @@ -221,7 +219,7 @@ const RouteCard: Component = (props) => { return (
- +
}