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;
|
return mod;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const amenityIcons: Record<string, string> = {
|
||||||
|
sauna: '🧖',
|
||||||
|
fireplace: '🔥',
|
||||||
|
wifi: '📶',
|
||||||
|
pets: '🐾',
|
||||||
|
lake: '🌊',
|
||||||
|
ac: '❄️',
|
||||||
|
kitchen: '🍽️',
|
||||||
|
dishwasher: '🧼',
|
||||||
|
washer: '🧺',
|
||||||
|
barbecue: '🍖',
|
||||||
|
};
|
||||||
|
|
||||||
function ListingsMap({
|
function ListingsMap({
|
||||||
listings,
|
listings,
|
||||||
center,
|
center,
|
||||||
|
|
@ -193,16 +206,16 @@ export default function ListingsIndexPage() {
|
||||||
}, [filteredByAddress, evCharging]);
|
}, [filteredByAddress, evCharging]);
|
||||||
|
|
||||||
const amenityOptions = [
|
const amenityOptions = [
|
||||||
{ key: 'sauna', label: t('amenitySauna') },
|
{ key: 'sauna', label: t('amenitySauna'), icon: amenityIcons.sauna },
|
||||||
{ key: 'fireplace', label: t('amenityFireplace') },
|
{ key: 'fireplace', label: t('amenityFireplace'), icon: amenityIcons.fireplace },
|
||||||
{ key: 'wifi', label: t('amenityWifi') },
|
{ key: 'wifi', label: t('amenityWifi'), icon: amenityIcons.wifi },
|
||||||
{ key: 'pets', label: t('amenityPets') },
|
{ key: 'pets', label: t('amenityPets'), icon: amenityIcons.pets },
|
||||||
{ key: 'lake', label: t('amenityLake') },
|
{ key: 'lake', label: t('amenityLake'), icon: amenityIcons.lake },
|
||||||
{ key: 'ac', label: t('amenityAirConditioning') },
|
{ key: 'ac', label: t('amenityAirConditioning'), icon: amenityIcons.ac },
|
||||||
{ key: 'kitchen', label: t('amenityKitchen') },
|
{ key: 'kitchen', label: t('amenityKitchen'), icon: amenityIcons.kitchen },
|
||||||
{ key: 'dishwasher', label: t('amenityDishwasher') },
|
{ key: 'dishwasher', label: t('amenityDishwasher'), icon: amenityIcons.dishwasher },
|
||||||
{ key: 'washer', label: t('amenityWashingMachine') },
|
{ key: 'washer', label: t('amenityWashingMachine'), icon: amenityIcons.washer },
|
||||||
{ key: 'barbecue', label: t('amenityBarbecue') },
|
{ key: 'barbecue', label: t('amenityBarbecue'), icon: amenityIcons.barbecue },
|
||||||
];
|
];
|
||||||
|
|
||||||
async function fetchListings() {
|
async function fetchListings() {
|
||||||
|
|
@ -331,7 +344,7 @@ export default function ListingsIndexPage() {
|
||||||
>
|
>
|
||||||
<div className="amenity-option-meta">
|
<div className="amenity-option-meta">
|
||||||
<span className="amenity-emoji" aria-hidden>
|
<span className="amenity-emoji" aria-hidden>
|
||||||
•
|
{opt.icon}
|
||||||
</span>
|
</span>
|
||||||
<span className="amenity-name">{opt.label}</span>
|
<span className="amenity-name">{opt.label}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue