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