feat(30-01): add shared hobby configuration with tag mappings

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-12 20:40:43 +02:00
parent edd1cdde68
commit d37e64e71c

66
src/shared/hobbyConfig.ts Normal file
View File

@@ -0,0 +1,66 @@
export interface HobbyDefinition {
id: string;
name: string;
icon: string; // Lucide icon name from iconData
descriptor: string; // Short tagline shown on card
tags: string[]; // Catalog tags to query for this hobby
}
export const HOBBIES: HobbyDefinition[] = [
{
id: "bikepacking",
name: "Bikepacking",
icon: "bike",
descriptor: "Ride & camp",
tags: ["bikepacking", "cycling", "camping"],
},
{
id: "hiking",
name: "Hiking",
icon: "mountain",
descriptor: "Trail gear",
tags: ["hiking", "backpacking", "camping"],
},
{
id: "climbing",
name: "Climbing",
icon: "mountain-snow",
descriptor: "Vertical kit",
tags: ["climbing", "mountaineering"],
},
{
id: "cycling",
name: "Cycling",
icon: "circle-dot",
descriptor: "Road & gravel",
tags: ["cycling", "road-cycling", "gravel"],
},
{
id: "camping",
name: "Camping",
icon: "tent",
descriptor: "Base camp",
tags: ["camping", "backpacking"],
},
{
id: "running",
name: "Running",
icon: "footprints",
descriptor: "Run light",
tags: ["running", "trail-running"],
},
];
/** Deduplicate and collect all tags for the given hobby IDs */
export function getTagsForHobbies(hobbyIds: string[]): string[] {
const tagSet = new Set<string>();
for (const id of hobbyIds) {
const hobby = HOBBIES.find((h) => h.id === id);
if (hobby) {
for (const t of hobby.tags) {
tagSet.add(t);
}
}
}
return [...tagSet];
}