From e30d956f58511c26040b1af5acd8ce328d821e56 Mon Sep 17 00:00:00 2001 From: Arthur DANJOU Date: Sun, 4 Jan 2026 19:23:08 +0100 Subject: [PATCH] =?UTF-8?q?fix:=20activer=20le=20chargement=20paresseux=20?= =?UTF-8?q?des=20donn=C3=A9es=20dans=20le=20composant=20Stats?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/components/home/live/Stats.vue | 4 +++- worker-configuration.d.ts | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/app/components/home/live/Stats.vue b/app/components/home/live/Stats.vue index 13490a6..6674337 100644 --- a/app/components/home/live/Stats.vue +++ b/app/components/home/live/Stats.vue @@ -2,7 +2,9 @@ import type { Stats } from '~~/types' import { usePrecision } from '@vueuse/math' -const { data: stats } = await useAsyncData('stats', () => $fetch('/api/stats')) +const { data: stats } = await useAsyncData('stats', () => $fetch('/api/stats'), { + lazy: true +}) const startDate = computed(() => new Date(stats.value!.coding.range.start)) const yearsCollected = useTimeAgo(startDate).value diff --git a/worker-configuration.d.ts b/worker-configuration.d.ts index 77af577..26cc966 100644 --- a/worker-configuration.d.ts +++ b/worker-configuration.d.ts @@ -1,7 +1,10 @@ /* eslint-disable */ -// Generated by Wrangler by running `wrangler types` (hash: 373e9a05bf207b93549ab53665d07e4b) +// Generated by Wrangler by running `wrangler types` (hash: 8c48032b4b2801cdbac6e8dbc9d26203) // Runtime types generated with workerd@1.20251210.0 2025-12-13 nodejs_compat declare namespace Cloudflare { + interface GlobalProps { + mainModule: typeof import("./.output/server/index"); + } interface Env { CACHE: KVNamespace; STUDIO_GITHUB_CLIENT_ID: string;