fix(profile): Format total distance
This commit is contained in:
parent
59cb42c336
commit
480fe3e0e5
@ -156,7 +156,7 @@
|
||||
<div class="w-full mx-auto">
|
||||
<div v-if="state.scans.length > 0">
|
||||
<p class="mb-2">
|
||||
{{ $t('total_distance') }}: {{ getReadableDistanceForUI() }}
|
||||
{{ $t('total_distance') }}: {{ getTotalReadableDistance() }}
|
||||
</p>
|
||||
|
||||
<table class="table-auto w-full text-left whitespace-no-wrap">
|
||||
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user