From f19f19bb75a457dc2073d8a06f064eae04a3b772 Mon Sep 17 00:00:00 2001 From: Dominik Pschenitschni Date: Sat, 6 Jul 2024 13:29:09 +0200 Subject: [PATCH] feat: use withDefaults for Comments --- .../src/components/tasks/partials/Comments.vue | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/frontend/src/components/tasks/partials/Comments.vue b/frontend/src/components/tasks/partials/Comments.vue index e2282c0dc..a27d521b0 100644 --- a/frontend/src/components/tasks/partials/Comments.vue +++ b/frontend/src/components/tasks/partials/Comments.vue @@ -200,15 +200,11 @@ import {useConfigStore} from '@/stores/config' import {useAuthStore} from '@/stores/auth' import Reactions from '@/components/input/Reactions.vue' -const props = defineProps({ - taskId: { - type: Number, - required: true, - }, - canWrite: { - type: Boolean, - default: true, - }, +const props = withDefaults(defineProps<{ + taskId: number, + canWrite?: boolean +}>(), { + canWrite: true, }) const {t} = useI18n({useScope: 'global'})