diff --git a/src/components/ServerDetailChart.tsx b/src/components/ServerDetailChart.tsx index d6d20a4..c1e2034 100644 --- a/src/components/ServerDetailChart.tsx +++ b/src/components/ServerDetailChart.tsx @@ -52,7 +52,7 @@ type connectChartData = { export default function ServerDetailChart({ server_id }: { server_id: string }) { const { lastMessage, connected } = useWebSocketContext() - if (!connected) { + if (!connected || !lastMessage) { return } diff --git a/src/components/ServerDetailOverview.tsx b/src/components/ServerDetailOverview.tsx index 8d3390a..817d7a6 100644 --- a/src/components/ServerDetailOverview.tsx +++ b/src/components/ServerDetailOverview.tsx @@ -18,7 +18,7 @@ export default function ServerDetailOverview({ server_id }: { server_id: string const { lastMessage, connected } = useWebSocketContext() - if (!connected) { + if (!connected || !lastMessage) { return } diff --git a/src/pages/Server.tsx b/src/pages/Server.tsx index 02b6dd1..efaa765 100644 --- a/src/pages/Server.tsx +++ b/src/pages/Server.tsx @@ -64,7 +64,7 @@ export default function Servers() { } }, [connected]) - if (!connected) { + if (!connected && !lastMessage) { return (