1
0
Fork 0
mirror of https://github.com/seanmorley15/AdventureLog.git synced 2025-07-19 04:49:37 +02:00

Refactor map page

This commit is contained in:
Sean Morley 2024-11-02 21:18:52 -04:00
parent e6c5bc9ca8
commit 07263c5697
7 changed files with 127 additions and 182 deletions

View file

@ -253,6 +253,39 @@ export let ADVENTURE_TYPES = [
{ type: 'other', label: 'Other' }
];
// adventure type to icon mapping
export let ADVENTURE_TYPE_ICONS = {
general: '🌍',
outdoor: '🏞️',
lodging: '🛌',
dining: '🍽️',
activity: '🏄',
attraction: '🎢',
shopping: '🛍️',
nightlife: '🌃',
event: '🎉',
transportation: '🚗',
culture: '🎭',
water_sports: '🚤',
hiking: '🥾',
wildlife: '🦒',
historical_sites: '🏛️',
music_concerts: '🎶',
fitness: '🏋️',
art_museums: '🎨',
festivals: '🎪',
spiritual_journeys: '🧘‍♀️',
volunteer_work: '🤝',
other: '❓'
};
type AdventureType = keyof typeof ADVENTURE_TYPE_ICONS;
export function getAdventureTypeLabel(type: AdventureType) {
const typeObj = ADVENTURE_TYPE_ICONS[type];
return typeObj;
}
export function getRandomBackground() {
const randomIndex = Math.floor(Math.random() * randomBackgrounds.backgrounds.length);
return randomBackgrounds.backgrounds[randomIndex] as Background;