explorer-app/pages/category/[id].vue

16 lines
334 B
Vue
Raw Normal View History

2023-12-19 18:43:42 +01:00
<script lang="ts" setup>
const dataStore = useData()
const { selectedCategoryId, filteredProjects } = storeToRefs(dataStore)
const route = useRoute()
onMounted(() => {
if (route.params.id)
selectedCategoryId.value = route.params.id as string
})
</script>
<template>
<ProjectGrid :projects="filteredProjects" />
</template>