explorer-app/components/Project/ProjectGrid.vue

27 lines
551 B
Vue
Raw Permalink Normal View History

2023-12-19 18:43:42 +01:00
<script lang="ts" setup>
import type { ProjectShallow } from '~/types'
const props = defineProps<{
projects: { title: string, projects: ProjectShallow[] }[]
2023-12-19 18:43:42 +01:00
}>()
const totalProjectsCount = props.projects.map(g => g.projects.length).reduce((a, b) => a + b, 0)
2023-12-19 18:43:42 +01:00
</script>
<template>
<div
flex
flex-col
items-start
>
<ProjectGridGroup
v-for="group in projects"
:key="group.title"
:group="group"
/>
<div v-if="totalProjectsCount === 0">
<h3>No Projects found...</h3>
</div>
2023-12-19 18:43:42 +01:00
</div>
</template>