display simple task
This commit is contained in:
@@ -1,11 +1,21 @@
|
||||
<script setup lang="ts">
|
||||
defineProps<{
|
||||
import { useTaskStore } from '@/use-cases/task/stores/useTask.store'
|
||||
import { computed } from 'vue'
|
||||
|
||||
const props = defineProps<{
|
||||
id: string
|
||||
}>()
|
||||
|
||||
const taskStore = useTaskStore()
|
||||
|
||||
const task = computed(() => taskStore.getTask(props.id))
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="task-view"></div>
|
||||
<div class="task-view" v-if="task">
|
||||
{{ task.title }}
|
||||
</div>
|
||||
<div v-else>Task not found</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
Reference in New Issue
Block a user