ui/StatsPage.tsx aktualisiert
Make the counters update faster to make it look more snappy.
This commit is contained in:
parent
85bd9b5861
commit
128c4312d4
|
@ -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}
|
||||
/>
|
||||
<Counter
|
||||
className="text-base"
|
||||
value={(getGlobalStats.data?.pixelStepsPerMinute ?? 0) / 60}
|
||||
digits={9}
|
||||
transitionDurationMs={2_000}
|
||||
transitionDurationMs={1_00}
|
||||
postfix="/s"
|
||||
/>
|
||||
</p>
|
||||
|
@ -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}
|
||||
/>
|
||||
<Counter
|
||||
className="text-base"
|
||||
value={(getGlobalStats.data?.pixelsPerMinute ?? 0) / 60}
|
||||
digits={9}
|
||||
transitionDurationMs={2_000}
|
||||
transitionDurationMs={1_00}
|
||||
postfix="/s"
|
||||
/>
|
||||
</p>
|
||||
|
@ -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}
|
||||
/>
|
||||
<Counter
|
||||
className="text-base"
|
||||
value={(getGlobalStats.data?.stepsPerMinute ?? 0) / 60}
|
||||
digits={3}
|
||||
fractionDigits={3}
|
||||
transitionDurationMs={2_000}
|
||||
transitionDurationMs={1_00}
|
||||
postfix="/s"
|
||||
/>
|
||||
</p>
|
||||
|
@ -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}
|
||||
/>
|
||||
<Counter
|
||||
className="text-base"
|
||||
value={(getGlobalStats.data?.imagesPerMinute ?? 0) / 60}
|
||||
digits={3}
|
||||
fractionDigits={3}
|
||||
transitionDurationMs={2_000}
|
||||
transitionDurationMs={1_00}
|
||||
postfix="/s"
|
||||
/>
|
||||
</p>
|
||||
|
@ -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}
|
||||
/>
|
||||
</p>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue