mango-v4-ui/components/RpcPing.tsx

24 lines
673 B
TypeScript
Raw Normal View History

2023-08-09 05:33:42 -07:00
import { formatNumericValue } from 'utils/numbers'
import { StatusDot } from './Tps'
2023-10-08 19:05:52 -07:00
import { rpcAlertThreshold, rpcWarningThreshold } from './StatusBar'
2023-08-09 05:33:42 -07:00
2023-10-08 19:05:52 -07:00
const RpcPing = ({ rpcPing }: { rpcPing: number }) => {
2023-08-09 05:33:42 -07:00
return (
<div>
<div className="flex items-center">
<StatusDot
status={rpcPing}
alert={rpcAlertThreshold}
warning={rpcWarningThreshold}
/>
2023-10-08 19:05:52 -07:00
<span className="font-mono text-xs text-th-fgd-2">
<span className="mr-1">{formatNumericValue(rpcPing, 0)}</span>
<span className="font-normal text-th-fgd-4">MS</span>
</span>
2023-08-09 05:33:42 -07:00
</div>
</div>
)
}
export default RpcPing