From 128c4312d4dc8fe6557c80c1ce0028dda8a790a5 Mon Sep 17 00:00:00 2001 From: Akiru Date: Thu, 25 Jan 2024 08:53:35 +0000 Subject: [PATCH] ui/StatsPage.tsx aktualisiert Make the counters update faster to make it look more snappy. --- ui/StatsPage.tsx | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/ui/StatsPage.tsx b/ui/StatsPage.tsx index 8c0cabe..c0c3201 100644 --- a/ui/StatsPage.tsx +++ b/ui/StatsPage.tsx @@ -7,7 +7,7 @@ export function StatsPage() { const getGlobalStats = useSWR( ["/stats", {}] as const, (args) => fetchApi(...args).then(handleResponse), - { refreshInterval: 2_000 }, + { refreshInterval: 1_00 }, ); return ( @@ -18,13 +18,13 @@ export function StatsPage() { className="font-bold text-zinc-700 dark:text-zinc-300" value={getGlobalStats.data?.pixelStepCount ?? 0} digits={15} - transitionDurationMs={3_000} + transitionDurationMs={1_00} />

@@ -34,13 +34,13 @@ export function StatsPage() { className="font-bold text-zinc-700 dark:text-zinc-300" value={getGlobalStats.data?.pixelCount ?? 0} digits={15} - transitionDurationMs={3_000} + transitionDurationMs={1_00} />

@@ -51,14 +51,14 @@ export function StatsPage() { className="font-bold text-zinc-700 dark:text-zinc-300" value={getGlobalStats.data?.stepCount ?? 0} digits={9} - transitionDurationMs={3_000} + transitionDurationMs={1_00} />

@@ -68,14 +68,14 @@ export function StatsPage() { className="font-bold text-zinc-700 dark:text-zinc-300" value={getGlobalStats.data?.imageCount ?? 0} digits={9} - transitionDurationMs={3_000} + transitionDurationMs={1_00} />

@@ -86,7 +86,7 @@ export function StatsPage() { className="font-bold text-zinc-700 dark:text-zinc-300" value={getGlobalStats.data?.userCount ?? 0} digits={6} - transitionDurationMs={1_500} + transitionDurationMs={1_00} />