fix: corriger l'utilisation des valeurs retournées pour yearsCollected et formattedDate dans le composant Stats

This commit is contained in:
2026-01-04 19:43:10 +01:00
parent 988e18b2f7
commit ed3019d1b9

View File

@@ -5,8 +5,8 @@ import { usePrecision } from '@vueuse/math'
const { data: stats } = await useAsyncData<Stats>('stats', () => $fetch('/api/stats')) const { data: stats } = await useAsyncData<Stats>('stats', () => $fetch('/api/stats'))
const startDate = computed(() => new Date(stats.value?.coding.range.start || '')) const startDate = computed(() => new Date(stats.value?.coding.range.start || ''))
const yearsCollected = useTimeAgo(startDate).value const yearsCollected = useTimeAgo(startDate)
const formattedDate = useDateFormat(startDate, 'MMM DD, YYYY').value const formattedDate = useDateFormat(startDate, 'MMM DD, YYYY')
const totalHours = usePrecision((stats.value?.coding.grand_total.total_seconds_including_other_language ?? 0) / 3600, 0) const totalHours = usePrecision((stats.value?.coding.grand_total.total_seconds_including_other_language ?? 0) / 3600, 0)