feat(SW-938) Updated icons
This commit is contained in:
@@ -9,13 +9,13 @@ import {
|
||||
DeskIcon,
|
||||
HairdryerIcon,
|
||||
HandSoapIcon,
|
||||
HeartIcon,
|
||||
IronIcon,
|
||||
MirrorIcon,
|
||||
NatureIcon,
|
||||
NoSmokingIcon,
|
||||
SafetyBoxIcon,
|
||||
ShowerIcon,
|
||||
StarFilledIcon,
|
||||
StreetIcon,
|
||||
WifiIcon,
|
||||
WindowCurtainsAltIcon,
|
||||
@@ -27,98 +27,101 @@ import {
|
||||
|
||||
import { IconProps } from "@/types/components/icon"
|
||||
|
||||
export function getFacilityIcon(name: string): FC<IconProps> | null {
|
||||
export function getFacilityIcon(
|
||||
name: string | undefined
|
||||
): FC<IconProps> | null {
|
||||
if (!name) return StarFilledIcon
|
||||
const iconMappings = [
|
||||
{
|
||||
icon: DeskIcon,
|
||||
texts: ["Desk and chair"],
|
||||
name: ["Desk and chair"],
|
||||
},
|
||||
{
|
||||
icon: HairdryerIcon,
|
||||
texts: ["Hairdryer"],
|
||||
name: ["Hairdryer"],
|
||||
},
|
||||
{
|
||||
icon: AcIcon,
|
||||
texts: ["Air Condition"],
|
||||
name: ["Air Condition"],
|
||||
},
|
||||
{
|
||||
icon: ChairIcon,
|
||||
texts: ["Armchair / armchairs"],
|
||||
name: ["Armchair / armchairs"],
|
||||
},
|
||||
{
|
||||
icon: BathtubIcon,
|
||||
texts: ["Bathroom with shower or bathtub"],
|
||||
name: ["Bathroom with shower or bathtub"],
|
||||
},
|
||||
{
|
||||
icon: WindowCurtainsAltIcon,
|
||||
texts: ["Blackout curtains"],
|
||||
name: ["Blackout curtains"],
|
||||
},
|
||||
{
|
||||
icon: MirrorIcon,
|
||||
texts: ["Cosmetic mirror"],
|
||||
name: ["Cosmetic mirror"],
|
||||
},
|
||||
{
|
||||
icon: WifiIcon,
|
||||
texts: ["Free WiFi"],
|
||||
name: ["FreeWiFi"],
|
||||
},
|
||||
{
|
||||
icon: ChairIcon,
|
||||
texts: ["Connecting rooms"],
|
||||
name: ["Connecting rooms"],
|
||||
},
|
||||
{
|
||||
icon: YardIcon,
|
||||
texts: ["View - atrium view"],
|
||||
name: ["View - atrium view"],
|
||||
},
|
||||
{
|
||||
icon: CityIcon,
|
||||
texts: ["View - city view"],
|
||||
name: ["View - city view"],
|
||||
},
|
||||
{
|
||||
icon: NatureIcon,
|
||||
texts: ["View - park view"],
|
||||
name: ["View - park view"],
|
||||
},
|
||||
{
|
||||
icon: StreetIcon,
|
||||
texts: ["View - street view"],
|
||||
name: ["View - street view"],
|
||||
},
|
||||
{
|
||||
icon: WineBarIcon,
|
||||
texts: ["Minibar"],
|
||||
name: ["Minibar"],
|
||||
},
|
||||
{
|
||||
icon: NoSmokingIcon,
|
||||
texts: ["Non smoking"],
|
||||
name: ["Non smoking"],
|
||||
},
|
||||
{
|
||||
icon: ShowerIcon,
|
||||
texts: ["Rain shower"],
|
||||
name: ["Rain shower"],
|
||||
},
|
||||
{
|
||||
icon: SafetyBoxIcon,
|
||||
texts: ["Safety box"],
|
||||
name: ["Safety box"],
|
||||
},
|
||||
{
|
||||
icon: BedDoubleIcon,
|
||||
texts: ["Set of two pillows"],
|
||||
name: ["Set of two pillows"],
|
||||
},
|
||||
{
|
||||
icon: IronIcon,
|
||||
texts: ["Iron and ironing board"],
|
||||
name: ["Iron and ironing board"],
|
||||
},
|
||||
{
|
||||
icon: HandSoapIcon,
|
||||
texts: ["Toiletries"],
|
||||
name: ["Toiletries"],
|
||||
},
|
||||
{
|
||||
icon: WoodFloorIcon,
|
||||
texts: ["Wooden floor"],
|
||||
name: ["Wooden floor"],
|
||||
},
|
||||
{
|
||||
icon: WindowNotAvailableIcon,
|
||||
texts: ["Not window"],
|
||||
name: ["Not window"],
|
||||
},
|
||||
]
|
||||
|
||||
const icon = iconMappings.find((icon) => icon.texts.includes(name))
|
||||
return icon ? icon.icon : HeartIcon
|
||||
const icon = iconMappings.find((icon) => icon.name.includes(name))
|
||||
return icon ? icon.icon : StarFilledIcon
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user