Good stuff
This commit is contained in:
parent
9da2db707f
commit
8032011708
32 changed files with 1052 additions and 374 deletions
31
frontend/src/lib/group-icons.ts
Normal file
31
frontend/src/lib/group-icons.ts
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
import type { ComponentType } from 'react';
|
||||
import {
|
||||
HouseIcon,
|
||||
RouteIcon,
|
||||
GraduationCapIcon,
|
||||
ChartBarIcon,
|
||||
ShieldIcon,
|
||||
UsersIcon,
|
||||
ShoppingBagIcon,
|
||||
TreeIcon,
|
||||
TagIcon,
|
||||
} from '../components/ui/icons';
|
||||
|
||||
const GROUP_ICONS: Record<string, ComponentType<{ className?: string }>> = {
|
||||
'Properties in the area': HouseIcon,
|
||||
Transport: RouteIcon,
|
||||
Education: GraduationCapIcon,
|
||||
Deprivation: ChartBarIcon,
|
||||
'Crime summary': ShieldIcon,
|
||||
Crime: ShieldIcon,
|
||||
Demographics: UsersIcon,
|
||||
Amenities: ShoppingBagIcon,
|
||||
Environment: TreeIcon,
|
||||
Property: TagIcon,
|
||||
};
|
||||
|
||||
export function getGroupIcon(
|
||||
group: string,
|
||||
): ComponentType<{ className?: string }> | null {
|
||||
return GROUP_ICONS[group] ?? null;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue