display simple task

This commit is contained in:
Julien Calixte
2023-04-09 11:02:44 +02:00
parent 682e02234d
commit 2bdfd86481

View File

@@ -1,11 +1,21 @@
<script setup lang="ts"> <script setup lang="ts">
defineProps<{ import { useTaskStore } from '@/use-cases/task/stores/useTask.store'
import { computed } from 'vue'
const props = defineProps<{
id: string id: string
}>() }>()
const taskStore = useTaskStore()
const task = computed(() => taskStore.getTask(props.id))
</script> </script>
<template> <template>
<div class="task-view"></div> <div class="task-view" v-if="task">
{{ task.title }}
</div>
<div v-else>Task not found</div>
</template> </template>
<style scoped> <style scoped>