forked from pinks/eris
1
0
Fork 0

webhooks #1

Merged
Akiru merged 12 commits from webhooks into main 2024-01-26 13:20:20 +00:00
1 changed files with 10 additions and 10 deletions
Showing only changes of commit 128c4312d4 - Show all commits

View File

@ -7,7 +7,7 @@ export function StatsPage() {
const getGlobalStats = useSWR( const getGlobalStats = useSWR(
["/stats", {}] as const, ["/stats", {}] as const,
(args) => fetchApi(...args).then(handleResponse), (args) => fetchApi(...args).then(handleResponse),
{ refreshInterval: 2_000 }, { refreshInterval: 1_00 },
); );
return ( return (
@ -18,13 +18,13 @@ export function StatsPage() {
className="font-bold text-zinc-700 dark:text-zinc-300" className="font-bold text-zinc-700 dark:text-zinc-300"
value={getGlobalStats.data?.pixelStepCount ?? 0} value={getGlobalStats.data?.pixelStepCount ?? 0}
digits={15} digits={15}
transitionDurationMs={3_000} transitionDurationMs={1_00}
/> />
<Counter <Counter
className="text-base" className="text-base"
value={(getGlobalStats.data?.pixelStepsPerMinute ?? 0) / 60} value={(getGlobalStats.data?.pixelStepsPerMinute ?? 0) / 60}
digits={9} digits={9}
transitionDurationMs={2_000} transitionDurationMs={1_00}
postfix="/s" postfix="/s"
/> />
</p> </p>
@ -34,13 +34,13 @@ export function StatsPage() {
className="font-bold text-zinc-700 dark:text-zinc-300" className="font-bold text-zinc-700 dark:text-zinc-300"
value={getGlobalStats.data?.pixelCount ?? 0} value={getGlobalStats.data?.pixelCount ?? 0}
digits={15} digits={15}
transitionDurationMs={3_000} transitionDurationMs={1_00}
/> />
<Counter <Counter
className="text-base" className="text-base"
value={(getGlobalStats.data?.pixelsPerMinute ?? 0) / 60} value={(getGlobalStats.data?.pixelsPerMinute ?? 0) / 60}
digits={9} digits={9}
transitionDurationMs={2_000} transitionDurationMs={1_00}
postfix="/s" postfix="/s"
/> />
</p> </p>
@ -51,14 +51,14 @@ export function StatsPage() {
className="font-bold text-zinc-700 dark:text-zinc-300" className="font-bold text-zinc-700 dark:text-zinc-300"
value={getGlobalStats.data?.stepCount ?? 0} value={getGlobalStats.data?.stepCount ?? 0}
digits={9} digits={9}
transitionDurationMs={3_000} transitionDurationMs={1_00}
/> />
<Counter <Counter
className="text-base" className="text-base"
value={(getGlobalStats.data?.stepsPerMinute ?? 0) / 60} value={(getGlobalStats.data?.stepsPerMinute ?? 0) / 60}
digits={3} digits={3}
fractionDigits={3} fractionDigits={3}
transitionDurationMs={2_000} transitionDurationMs={1_00}
postfix="/s" postfix="/s"
/> />
</p> </p>
@ -68,14 +68,14 @@ export function StatsPage() {
className="font-bold text-zinc-700 dark:text-zinc-300" className="font-bold text-zinc-700 dark:text-zinc-300"
value={getGlobalStats.data?.imageCount ?? 0} value={getGlobalStats.data?.imageCount ?? 0}
digits={9} digits={9}
transitionDurationMs={3_000} transitionDurationMs={1_00}
/> />
<Counter <Counter
className="text-base" className="text-base"
value={(getGlobalStats.data?.imagesPerMinute ?? 0) / 60} value={(getGlobalStats.data?.imagesPerMinute ?? 0) / 60}
digits={3} digits={3}
fractionDigits={3} fractionDigits={3}
transitionDurationMs={2_000} transitionDurationMs={1_00}
postfix="/s" postfix="/s"
/> />
</p> </p>
@ -86,7 +86,7 @@ export function StatsPage() {
className="font-bold text-zinc-700 dark:text-zinc-300" className="font-bold text-zinc-700 dark:text-zinc-300"
value={getGlobalStats.data?.userCount ?? 0} value={getGlobalStats.data?.userCount ?? 0}
digits={6} digits={6}
transitionDurationMs={1_500} transitionDurationMs={1_00}
/> />
</p> </p>
</div> </div>