2023-12-19 18:43:42 +01:00
|
|
|
<script lang="ts" setup>
|
|
|
|
const dataStore = useData()
|
2024-09-12 11:56:16 +02:00
|
|
|
const { selectedCategoryId, categories, filteredProjects } = storeToRefs(dataStore)
|
2023-12-19 18:43:42 +01:00
|
|
|
|
|
|
|
const route = useRoute()
|
|
|
|
|
|
|
|
onMounted(() => {
|
|
|
|
if (route.params.id)
|
|
|
|
selectedCategoryId.value = route.params.id as string
|
|
|
|
})
|
2024-09-12 11:56:16 +02:00
|
|
|
|
|
|
|
const group = [{ title: categories.value.find(c => c.id === selectedCategoryId.value)!.name, projects: filteredProjects.value }]
|
2023-12-19 18:43:42 +01:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
2024-09-12 11:56:16 +02:00
|
|
|
<ProjectGrid :projects="group" />
|
2023-12-19 18:43:42 +01:00
|
|
|
</template>
|