feat: improve directions panel with route legend and place card below

- Add route legend showing wilderness (dashed orange) vs road (solid blue)
- Show place card below directions panel when clicking map during routing
- Clean up error messages to be user-friendly (no offroute text)
- Legend only appears when route has wilderness segments

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Matt 2026-05-09 03:37:05 +00:00
commit 19a96cba5e
2 changed files with 316 additions and 267 deletions

View file

@ -90,10 +90,23 @@ export default function Panel({ onClearRoute }) {
const showEmptyState = panelState === 'IDLE' && !hasRoutePoints
const routesContent = directionsMode ? (
<DirectionsPanel onClose={() => {
setDirectionsMode(false)
onClearRoute?.()
}} />
<>
<DirectionsPanel onClose={() => {
setDirectionsMode(false)
onClearRoute?.()
}} />
{/* Show place card below directions when clicking map during routing */}
{selectedPlace && (
<div className="mt-3 border-t pt-3" style={{ borderColor: "var(--border)" }}>
<PlaceCard
place={selectedPlace}
variant="preview"
expanded={true}
onClose={clearSelectedPlace}
/>
</div>
)}
</>
) : (
<>
<SearchBar />