From 95d8cdffe4cee8f090d9516f0e7f1e5ece8cf124 Mon Sep 17 00:00:00 2001 From: kolaente Date: Sun, 20 Feb 2022 21:22:31 +0100 Subject: [PATCH] chore: return the title directly --- src/views/tasks/ShowTasks.vue | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/views/tasks/ShowTasks.vue b/src/views/tasks/ShowTasks.vue index 69dd5d58..51b05580 100644 --- a/src/views/tasks/ShowTasks.vue +++ b/src/views/tasks/ShowTasks.vue @@ -98,17 +98,15 @@ const pageTitle = computed(() => { .find(([key, value]) => dateFrom === value[0] && dateTo === value[1]) ?.[0] if (typeof predefinedRange !== 'undefined') { - title = t(`input.datepickerRange.ranges.${predefinedRange}`) - } else { - title = showAll - ? t('task.show.titleCurrent') - : t('task.show.fromuntil', { - from: formatDate(dateFrom, 'PPP'), - until: formatDate(dateTo, 'PPP'), - }) + return t(`input.datepickerRange.ranges.${predefinedRange}`) } - return title + return showAll + ? t('task.show.titleCurrent') + : t('task.show.fromuntil', { + from: formatDate(dateFrom, 'PPP'), + until: formatDate(dateTo, 'PPP'), + }) }) const tasksSorted = computed(() => { // Sort all tasks to put those with a due date before the ones without a due date, the