portfolio/pages/work/[slug].vue
Michael Winter 635cbe0482 Add shareable work pages with modal support
- Create IndexContent component to avoid code duplication
- Score icon links to /work/[slug] with clean URLs
- Modal opens automatically via slug prop (works with SSR)
- Crawler finds and prerenders all /work/ pages (145 routes)
- Work page redirects to / when modal closes
- Single source of truth for data fetching in IndexContent
2026-03-06 10:23:45 +01:00

21 lines
394 B
Vue

<template>
<IndexContent :slug="slug" />
</template>
<script setup>
import { useModalStore } from "@/stores/ModalStore"
import { watch } from "vue"
const route = useRoute()
const modalStore = useModalStore()
const router = useRouter()
const slug = route.params.slug
watch(() => modalStore.isOpen, (isOpen) => {
if (!isOpen) {
router.push('/')
}
})
</script>