Fix sparklines not rendering on initial page load in Chromium
All checks were successful
CI / build (push) Successful in 1m2s
CI / docker (push) Successful in 48s
CI / deploy (push) Successful in 38s

Replace useId() with colon-free ref-based ID generator to avoid SVG
url() gradient resolution failures, and add placeholderData to
timeseries query to prevent flash during refetch.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
hsiegeln
2026-03-13 22:00:44 +01:00
parent cf804638d7
commit 96a5b00b99
2 changed files with 4 additions and 2 deletions

View File

@@ -46,6 +46,7 @@ export function useStatsTimeseries(timeFrom: string | undefined, timeTo: string
return data!;
},
enabled: !!timeFrom,
placeholderData: (prev) => prev,
refetchInterval: 30_000,
});
}