fix metrics
This commit is contained in:
parent
2053f7baef
commit
081c0c9f92
@ -51,8 +51,7 @@ const stats: Stat[] = [
|
||||
|
||||
export function Stats(): ReactElement {
|
||||
const { lastMessage, readyState } = useWebSocket("wss://api.mcutils.xyz/websocket/metrics");
|
||||
const metrics =
|
||||
lastMessage !== null && readyState == ReadyState.OPEN ? JSON.parse(lastMessage.data).metrics : undefined;
|
||||
const metrics = lastMessage !== null && readyState == ReadyState.OPEN ? JSON.parse(lastMessage.data) : undefined;
|
||||
|
||||
return (
|
||||
<div className="flex gap-2 flex-wrap justify-center">
|
||||
|
Loading…
Reference in New Issue
Block a user