refactor: websocket connect

This commit is contained in:
hamster1963
2024-12-02 02:15:46 +08:00
parent 6344064977
commit a9186f1148
6 changed files with 83 additions and 32 deletions

View File

@@ -56,9 +56,9 @@ export default function ServerDetailChart({
}: {
server_id: string;
}) {
const { lastMessage, readyState } = useWebSocketContext();
const { lastMessage, connected } = useWebSocketContext();
if (readyState !== 1) {
if (!connected) {
return <ServerDetailChartLoading />;
}