Switches out all the old icons to new ones, and moves them to the design system. The new icons are of three different types: Materialise Symbol, Nucleo, and Customized. Also adds further mapping between facilities/amenities and icons. Approved-by: Michael Zetterberg Approved-by: Erik Tiekstra
25 lines
821 B
TypeScript
25 lines
821 B
TypeScript
import { IconName } from "@/components/Icons/iconName"
|
|
|
|
import { PointOfInterestGroupEnum } from "@/types/enums/pointOfInterest"
|
|
|
|
export function getIconByPoiGroupAndCategory(
|
|
group: PointOfInterestGroupEnum,
|
|
category?: string
|
|
) {
|
|
switch (group) {
|
|
case PointOfInterestGroupEnum.PUBLIC_TRANSPORT:
|
|
return category === "Airport" ? IconName.Airplane : IconName.Train
|
|
case PointOfInterestGroupEnum.ATTRACTIONS:
|
|
return category === "Museum" ? IconName.Museum : IconName.Camera
|
|
case PointOfInterestGroupEnum.BUSINESS:
|
|
return IconName.Business
|
|
case PointOfInterestGroupEnum.PARKING:
|
|
return IconName.Parking
|
|
case PointOfInterestGroupEnum.SHOPPING_DINING:
|
|
return IconName.Shopping
|
|
case PointOfInterestGroupEnum.LOCATION:
|
|
default:
|
|
return IconName.Location
|
|
}
|
|
}
|