mirror of
https://github.com/ArthurDanjou/artsite.git
synced 2026-01-14 13:54:05 +01:00
fix: activer le chargement paresseux des données dans le composant Stats
This commit is contained in:
@@ -2,7 +2,9 @@
|
|||||||
import type { Stats } from '~~/types'
|
import type { Stats } from '~~/types'
|
||||||
import { usePrecision } from '@vueuse/math'
|
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 startDate = computed(() => new Date(stats.value!.coding.range.start))
|
||||||
const yearsCollected = useTimeAgo(startDate).value
|
const yearsCollected = useTimeAgo(startDate).value
|
||||||
|
|||||||
5
worker-configuration.d.ts
vendored
5
worker-configuration.d.ts
vendored
@@ -1,7 +1,10 @@
|
|||||||
/* eslint-disable */
|
/* 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
|
// Runtime types generated with workerd@1.20251210.0 2025-12-13 nodejs_compat
|
||||||
declare namespace Cloudflare {
|
declare namespace Cloudflare {
|
||||||
|
interface GlobalProps {
|
||||||
|
mainModule: typeof import("./.output/server/index");
|
||||||
|
}
|
||||||
interface Env {
|
interface Env {
|
||||||
CACHE: KVNamespace;
|
CACHE: KVNamespace;
|
||||||
STUDIO_GITHUB_CLIENT_ID: string;
|
STUDIO_GITHUB_CLIENT_ID: string;
|
||||||
|
|||||||
Reference in New Issue
Block a user