diff --git a/apps/planner/app/components/SessionView.tsx b/apps/planner/app/components/SessionView.tsx index 18b4dc2..cadb4ef 100644 --- a/apps/planner/app/components/SessionView.tsx +++ b/apps/planner/app/components/SessionView.tsx @@ -142,7 +142,7 @@ function ColorModeToggle({ yjs }: { yjs: YjsState }) { ); } -function SidebarTabs({ yjs, routeStats, days }: { yjs: YjsState; routeStats: ReturnType["routeStats"]; days: ReturnType }) { +function SidebarTabs({ yjs, routeStats, days, onWaypointHover }: { yjs: YjsState; routeStats: ReturnType["routeStats"]; days: ReturnType; onWaypointHover: (position: [number, number] | null) => void }) { const { t } = useTranslation("planner"); const [tab, setTab] = useState<"waypoints" | "notes">("waypoints"); @@ -165,7 +165,7 @@ function SidebarTabs({ yjs, routeStats, days }: { yjs: YjsState; routeStats: Ret
{tab === "waypoints" ? ( - + ) : ( @@ -292,7 +292,7 @@ export function SessionView({ sessionId, callbackUrl, callbackToken, returnUrl, - +
{toasts.length > 0 && ( diff --git a/apps/planner/app/components/WaypointSidebar.tsx b/apps/planner/app/components/WaypointSidebar.tsx index f238e18..5d53651 100644 --- a/apps/planner/app/components/WaypointSidebar.tsx +++ b/apps/planner/app/components/WaypointSidebar.tsx @@ -30,9 +30,10 @@ interface WaypointSidebarProps { elevationLoss?: number; }; days: DayStage[]; + onWaypointHover?: (position: [number, number] | null) => void; } -export function WaypointSidebar({ yjs, routeStats, days }: WaypointSidebarProps) { +export function WaypointSidebar({ yjs, routeStats, days, onWaypointHover }: WaypointSidebarProps) { const { t } = useTranslation("planner"); const [waypoints, setWaypoints] = useState([]); @@ -86,7 +87,12 @@ export function WaypointSidebar({ yjs, routeStats, days }: WaypointSidebarProps) const hasMultipleDays = days.length > 1; const renderWaypointRow = (wp: WaypointData, i: number) => ( -
  • +
  • onWaypointHover?.([wp.lat, wp.lon])} + onMouseLeave={() => onWaypointHover?.(null)} + > {i + 1}