From 480fe3e0e568939507e5cc21c48e98634614d4e6 Mon Sep 17 00:00:00 2001 From: Nicolai Ort Date: Mon, 26 May 2025 18:58:43 +0200 Subject: [PATCH] fix(profile): Format total distance --- src/views/Profile.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/views/Profile.vue b/src/views/Profile.vue index 2cf4dfe..14b53f8 100644 --- a/src/views/Profile.vue +++ b/src/views/Profile.vue @@ -156,7 +156,7 @@

- {{ $t('total_distance') }}: {{ getReadableDistanceForUI() }} + {{ $t('total_distance') }}: {{ getTotalReadableDistance() }}

@@ -420,8 +420,8 @@ const props = defineProps({ }); const accesstoken = props.token; -function getReadableDistanceForUI() { - return state.scans.reduce((accumulator, currentValue) => accumulator + currentValue.distance, 0) +function getTotalReadableDistance() { + return getReadableDistance(state.scans.reduce((accumulator, currentValue) => accumulator + currentValue.distance, 0)); } function getReadableDistance(distance) {