good changes

This commit is contained in:
Andras Schmelczer 2026-03-25 08:04:48 +00:00
parent 160283f1a1
commit c997ea46a5
26 changed files with 991 additions and 288 deletions

View file

@ -189,22 +189,7 @@ export const STACKED_ENUM_GROUPS: Record<
valueColors: ['#3b82f6', '#f59e0b'],
},
],
Environment: [
{
label: 'Ground Risk',
feature: 'Environmental risk',
components: [
'Collapsible deposits risk',
'Compressible ground risk',
'Landslide risk',
'Running sand risk',
'Shrink-swell risk',
'Soluble rocks risk',
],
valueOrder: ['Low', 'Moderate', 'Significant'],
valueColors: ['#22c55e', '#eab308', '#ef4444'],
},
],
Environment: [],
};
/**

View file

@ -443,52 +443,6 @@ const FEATURE_ICON_PATHS: Record<string, ReactNode> = {
<line x1="12" y1="20" x2="12.01" y2="20" />
</>
),
'Environmental risk': (
<>
<path d="M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z" />
<line x1="12" y1="9" x2="12" y2="13" />
<line x1="12" y1="17" x2="12.01" y2="17" />
</>
),
'Collapsible deposits risk': (
<>
<polyline points="12 2 2 7 12 12 22 7 12 2" />
<polyline points="2 17 12 22 22 17" />
<polyline points="2 12 12 17 22 12" />
</>
),
'Compressible ground risk': (
<>
<line x1="12" y1="2" x2="12" y2="22" />
<polyline points="16 6 12 2 8 6" />
<polyline points="16 18 12 22 8 18" />
<line x1="4" y1="12" x2="20" y2="12" />
</>
),
'Landslide risk': (
<>
<path d="M8 3l4 8 5-5 5 15H2L8 3z" />
</>
),
'Running sand risk': (
<>
<path d="M2 6c2-1 4-1 6 0s4 1 6 0 4-1 6 0" />
<path d="M2 12c2-1 4-1 6 0s4 1 6 0 4-1 6 0" />
<path d="M2 18c2-1 4-1 6 0s4 1 6 0 4-1 6 0" />
</>
),
'Shrink-swell risk': (
<>
<line x1="2" y1="12" x2="22" y2="12" />
<polyline points="6 8 2 12 6 16" />
<polyline points="18 8 22 12 18 16" />
</>
),
'Soluble rocks risk': (
<>
<path d="M12 2.69l5.66 5.66a8 8 0 11-11.31 0z" />
</>
),
};
/**

View file

@ -186,5 +186,13 @@ export function summarizeParams(queryString: string): string {
}
}
const ttParams = params.getAll('tt');
if (ttParams.length > 0) {
const count = ttParams.filter(Boolean).length;
if (count > 0) {
parts.push(`${count} travel time ${count === 1 ? 'destination' : 'destinations'}`);
}
}
return parts.length > 0 ? parts.join(' + ') : 'No filters';
}