This commit is contained in:
Andras Schmelczer 2026-02-22 21:09:22 +00:00
parent eb02b5832b
commit 7a12e6c09a
2 changed files with 10 additions and 21 deletions

View file

@ -76,12 +76,13 @@ export function useMapData({
);
// Build the travel param string from entries with destinations
// Format: mode:slug|mode:slug or mode:slug:min:max|mode:slug
// Format: mode:slug|mode:slug:best or mode:slug:min:max|mode:slug:best:min:max
const travelParam = useMemo((): string => {
const segments: string[] = [];
for (const entry of travelTimeEntries) {
if (!entry.slug) continue;
let seg = `${entry.mode}:${entry.slug}`;
if (entry.useBest) seg += ':best';
if (entry.timeRange) {
seg += `:${entry.timeRange[0]}:${entry.timeRange[1]}`;
}