mirror of
https://github.com/web3privacy/explorer-app.git
synced 2024-10-15 16:46:26 +02:00
17 lines
465 B
Vue
17 lines
465 B
Vue
<script lang="ts" setup>
|
|
const dataStore = useData()
|
|
const { selectedCategoryId, categories, filteredProjects } = storeToRefs(dataStore)
|
|
|
|
const route = useRoute()
|
|
|
|
onMounted(() => {
|
|
if (route.params.id)
|
|
selectedCategoryId.value = route.params.id as string
|
|
})
|
|
|
|
const group = [{ title: categories.value.find(c => c.id === selectedCategoryId.value)!.name, projects: filteredProjects.value }]
|
|
</script>
|
|
|
|
<template>
|
|
<ProjectGrid :projects="group" />
|
|
</template>
|