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
|
2023-11-09 15:19:49 -08:00
|
|
|
status={rpcPing ? rpcPing : 1000}
|
2023-08-09 05:33:42 -07:00
|
|
|
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
|