Refactor AreaTabs component to correct product area labels and routing logic

- Updated labels for 'experimenta' and 'makerspace' to singular form for consistency.
- Adjusted computed property to return simplified area identifiers for improved routing clarity.
This commit is contained in:
Bastian Masanek
2025-11-03 10:45:45 +01:00
parent 68ab42f2f4
commit 14fc293ebe

View File

@@ -16,7 +16,7 @@ interface ProductArea {
const areas: ProductArea[] = [ const areas: ProductArea[] = [
{ {
id: 'experimenta', id: 'experimenta',
label: 'experimenta Jahreskarten', label: 'experimenta Jahreskarte',
icon: Sparkles, icon: Sparkles,
enabled: true, enabled: true,
visible: true, visible: true,
@@ -24,7 +24,7 @@ const areas: ProductArea[] = [
}, },
{ {
id: 'makerspace', id: 'makerspace',
label: 'Makerspace Jahreskarten', label: 'Makerspace Jahreskarte',
icon: Wrench, icon: Wrench,
enabled: true, enabled: true,
visible: true, visible: true,
@@ -46,13 +46,13 @@ const route = useRoute()
const currentArea = computed(() => { const currentArea = computed(() => {
// Determine current area based on route // Determine current area based on route
if (route.path.startsWith('/products') || route.path === '/') { if (route.path.startsWith('/products') || route.path === '/') {
return 'makerspace-annual-passes' return 'makerspace'
} else if (route.path.startsWith('/labs')) { } else if (route.path.startsWith('/labs')) {
return 'labs' return 'labs'
} else if (route.path.startsWith('/experimenta')) { } else if (route.path.startsWith('/experimenta')) {
return 'experimenta-annual-passes' return 'experimenta'
} }
return 'makerspace-annual-passes' return 'makerspace'
}) })
function navigateToArea(area: ProductArea) { function navigateToArea(area: ProductArea) {