From 081c0c9f923870b436bbfb81f6aeb6479db1d30c Mon Sep 17 00:00:00 2001 From: Liam Date: Thu, 18 Apr 2024 12:49:38 +0100 Subject: [PATCH] fix metrics --- src/app/components/stats.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/app/components/stats.tsx b/src/app/components/stats.tsx index 0a8249b..efdd67e 100644 --- a/src/app/components/stats.tsx +++ b/src/app/components/stats.tsx @@ -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 (