Add amenity icons to browse filters
This commit is contained in:
parent
d4e84f0b44
commit
e95d9e0b56
1 changed files with 24 additions and 11 deletions
|
|
@ -73,6 +73,19 @@ async function loadLeaflet(): Promise<LeafletLib> {
|
|||
return mod;
|
||||
}
|
||||
|
||||
const amenityIcons: Record<string, string> = {
|
||||
sauna: '🧖',
|
||||
fireplace: '🔥',
|
||||
wifi: '📶',
|
||||
pets: '🐾',
|
||||
lake: '🌊',
|
||||
ac: '❄️',
|
||||
kitchen: '🍽️',
|
||||
dishwasher: '🧼',
|
||||
washer: '🧺',
|
||||
barbecue: '🍖',
|
||||
};
|
||||
|
||||
function ListingsMap({
|
||||
listings,
|
||||
center,
|
||||
|
|
@ -193,16 +206,16 @@ export default function ListingsIndexPage() {
|
|||
}, [filteredByAddress, evCharging]);
|
||||
|
||||
const amenityOptions = [
|
||||
{ key: 'sauna', label: t('amenitySauna') },
|
||||
{ key: 'fireplace', label: t('amenityFireplace') },
|
||||
{ key: 'wifi', label: t('amenityWifi') },
|
||||
{ key: 'pets', label: t('amenityPets') },
|
||||
{ key: 'lake', label: t('amenityLake') },
|
||||
{ key: 'ac', label: t('amenityAirConditioning') },
|
||||
{ key: 'kitchen', label: t('amenityKitchen') },
|
||||
{ key: 'dishwasher', label: t('amenityDishwasher') },
|
||||
{ key: 'washer', label: t('amenityWashingMachine') },
|
||||
{ key: 'barbecue', label: t('amenityBarbecue') },
|
||||
{ key: 'sauna', label: t('amenitySauna'), icon: amenityIcons.sauna },
|
||||
{ key: 'fireplace', label: t('amenityFireplace'), icon: amenityIcons.fireplace },
|
||||
{ key: 'wifi', label: t('amenityWifi'), icon: amenityIcons.wifi },
|
||||
{ key: 'pets', label: t('amenityPets'), icon: amenityIcons.pets },
|
||||
{ key: 'lake', label: t('amenityLake'), icon: amenityIcons.lake },
|
||||
{ key: 'ac', label: t('amenityAirConditioning'), icon: amenityIcons.ac },
|
||||
{ key: 'kitchen', label: t('amenityKitchen'), icon: amenityIcons.kitchen },
|
||||
{ key: 'dishwasher', label: t('amenityDishwasher'), icon: amenityIcons.dishwasher },
|
||||
{ key: 'washer', label: t('amenityWashingMachine'), icon: amenityIcons.washer },
|
||||
{ key: 'barbecue', label: t('amenityBarbecue'), icon: amenityIcons.barbecue },
|
||||
];
|
||||
|
||||
async function fetchListings() {
|
||||
|
|
@ -331,7 +344,7 @@ export default function ListingsIndexPage() {
|
|||
>
|
||||
<div className="amenity-option-meta">
|
||||
<span className="amenity-emoji" aria-hidden>
|
||||
•
|
||||
{opt.icon}
|
||||
</span>
|
||||
<span className="amenity-name">{opt.label}</span>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue