feat(events): add Back button to the calendar page
The calendar page had no way back to the feed except the browser/back gesture. Add a top-bar ghost Back link (ArrowLeft + "Back" → events feed) mirroring EventDetailPage's pattern for navigation consistency. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
32a7389d0b
commit
52e9d11ea9
1 changed files with 14 additions and 1 deletions
|
|
@ -2,7 +2,7 @@
|
|||
import { computed, onMounted, ref } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { Ticket } from 'lucide-vue-next'
|
||||
import { ArrowLeft, Ticket } from 'lucide-vue-next'
|
||||
import { Button } from '@/components/ui/button'
|
||||
import { useEvents } from '../composables/useEvents'
|
||||
import { useOwnedTickets } from '../composables/useOwnedTickets'
|
||||
|
|
@ -34,10 +34,23 @@ onMounted(() => {
|
|||
function handleSelectEvent(event: Event) {
|
||||
router.push({ name: 'event-detail', params: { id: event.id } })
|
||||
}
|
||||
|
||||
function goBack() {
|
||||
router.push({ name: 'events' })
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="container mx-auto px-4 py-6 max-w-lg">
|
||||
<!-- Back to the events feed — mirrors EventDetailPage's top-bar
|
||||
back link for navigation consistency. -->
|
||||
<div class="flex items-center mb-4">
|
||||
<Button variant="ghost" size="sm" class="gap-1.5" @click="goBack">
|
||||
<ArrowLeft class="w-4 h-4" />
|
||||
{{ t('common.nav.back', 'Back') }}
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
<!-- Filter chip: narrows the calendar to events the user has
|
||||
paid tickets for. Hidden when logged out — nothing to own.
|
||||
Left-aligned so it doesn't collide with the fixed top-right
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue