aboutsummaryrefslogtreecommitdiff
path: root/src/frontend
diff options
context:
space:
mode:
authorAriel Costas Guerrero <ariel@costas.dev>2026-03-21 00:36:25 +0100
committerAriel Costas Guerrero <ariel@costas.dev>2026-03-21 00:36:25 +0100
commitf1b0b5f7ceaf6d23ae347e12cf29eef617c7dc9b (patch)
treed92c6075d019d87fd03482774050d7fc8981a5aa /src/frontend
parent2ef155c0c68208eccf968919fea12133698b50a9 (diff)
feat: enhance geocoding and stop search with performance metrics and improved response handling
Diffstat (limited to 'src/frontend')
-rw-r--r--src/frontend/app/components/PlaceListItem.tsx6
-rw-r--r--src/frontend/app/routes/planner.tsx32
2 files changed, 22 insertions, 16 deletions
diff --git a/src/frontend/app/components/PlaceListItem.tsx b/src/frontend/app/components/PlaceListItem.tsx
index 6c4f4a7..21250d6 100644
--- a/src/frontend/app/components/PlaceListItem.tsx
+++ b/src/frontend/app/components/PlaceListItem.tsx
@@ -1,8 +1,12 @@
-import { Building2, MapPin } from "lucide-react";
+import { Building2, BusFront, MapPin } from "lucide-react";
import type { PlannerSearchResult } from "~/data/PlannerApi";
function getIcon(layer?: string) {
switch ((layer || "").toLowerCase()) {
+ case "stop":
+ return (
+ <BusFront className="w-4 h-4 text-slate-600 dark:text-slate-400" />
+ );
case "venue":
return (
<Building2 className="w-4 h-4 text-slate-600 dark:text-slate-400" />
diff --git a/src/frontend/app/routes/planner.tsx b/src/frontend/app/routes/planner.tsx
index c2fc648..d70da87 100644
--- a/src/frontend/app/routes/planner.tsx
+++ b/src/frontend/app/routes/planner.tsx
@@ -805,22 +805,24 @@ const ItineraryDetail = ({
)}
</li>
{/* Intermediate stops */}
- {leg.intermediateStops.map((stop, sIdx) => (
- <li
- key={sIdx}
- className="flex items-center gap-1.5 py-0.5 px-1.5 text-gray-500 dark:text-gray-400"
- >
- <span className="w-1 h-1 rounded-full bg-gray-400 dark:bg-gray-500 inline-block shrink-0 ml-0.5" />
- <span className="flex-1">
- {stop.name}
- </span>
- {stop.stopCode && (
- <span className="text-[10px] text-gray-400 dark:text-gray-500 shrink-0">
- {stop.stopCode}
+ {leg.intermediateStops
+ .slice(1, -1)
+ .map((stop, sIdx) => (
+ <li
+ key={sIdx}
+ className="flex items-center gap-1.5 py-0.5 px-1.5 text-gray-500 dark:text-gray-400"
+ >
+ <span className="w-1 h-1 rounded-full bg-gray-400 dark:bg-gray-500 inline-block shrink-0 ml-0.5" />
+ <span className="flex-1">
+ {stop.name}
</span>
- )}
- </li>
- ))}
+ {stop.stopCode && (
+ <span className="text-[10px] text-gray-400 dark:text-gray-500 shrink-0">
+ {stop.stopCode}
+ </span>
+ )}
+ </li>
+ ))}
{/* Alighting stop */}
<li className="flex items-center gap-1.5 py-0.5 px-1.5 rounded bg-primary/8 font-semibold text-primary">
<span className="w-1.5 h-1.5 rounded-full bg-primary inline-block shrink-0" />