fix: activer le chargement paresseux des données dans le composant Stats

This commit is contained in:
2026-01-04 19:23:08 +01:00
parent 56c63d8db7
commit e30d956f58
2 changed files with 7 additions and 2 deletions

View File

@@ -2,7 +2,9 @@
import type { Stats } from '~~/types'
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'), {
lazy: true
})
const startDate = computed(() => new Date(stats.value!.coding.range.start))
const yearsCollected = useTimeAgo(startDate).value