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

53 lines
1.2 KiB
Vue
Raw Permalink Normal View History

2023-12-19 18:43:42 +01:00
<script lang="ts" setup>
import type { Project } from '~/types'
definePageMeta({
layout: 'detail',
})
const route = useRoute()
const dataStore = useData()
const { getProjectById } = dataStore
const { projects } = storeToRefs(dataStore)
const project = ref<Project>()
await until(projects).toMatch(p => p?.length > 0)
project.value = getProjectById<Project>(route.params.id as string)
if (!project.value) {
throw createError({
statusCode: 404,
message: 'Project not found',
fatal: true,
})
}
2023-12-22 14:02:31 +01:00
useHead({
title: project.value.name,
})
useSeoMeta({
ogTitle: project.value.name,
ogDescription: project.value.description,
2023-12-22 14:07:51 +01:00
ogImage: project.value?.logos?.at(0)?.url ?? '',
2023-12-22 14:02:31 +01:00
})
2023-12-19 18:43:42 +01:00
</script>
<template>
<div v-if="project">
<div app-container>
<div flex flex-col gap-48px mt-54px>
<div>
<div>
<ProjectHeading :project="project" />
<ProjectOpeness :project="project" />
<ProjectTechnology :project="project" />
<ProjectPrivacy :project="project" />
<ProjectSecurity :project="project" />
<!-- <ProjectActivity :project="project" />
<ProjectMarket /> -->
</div>
</div>
</div>
</div>
<Footer />
</div>
</template>