mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
20 lines
620 B
TypeScript
20 lines
620 B
TypeScript
import { Box } from "@mantine/core"
|
|
import type { MetricTimer } from "app/types"
|
|
|
|
interface MetricTimerProps {
|
|
timer: MetricTimer
|
|
}
|
|
|
|
export function Timer(props: MetricTimerProps) {
|
|
return (
|
|
<Box>
|
|
<Box>Mean: {props.timer.mean_rate.toFixed(2)}</Box>
|
|
<Box>Last minute: {props.timer.m1_rate.toFixed(2)}</Box>
|
|
<Box>Last 5 minutes: {props.timer.m5_rate.toFixed(2)}</Box>
|
|
<Box>Last 15 minutes: {props.timer.m15_rate.toFixed(2)}</Box>
|
|
<Box>Units: {props.timer.rate_units}</Box>
|
|
<Box>Total: {props.timer.count}</Box>
|
|
</Box>
|
|
)
|
|
}
|