From 50704b68ac12dc78027deef1e3d8f0710f370cb0 Mon Sep 17 00:00:00 2001 From: song_xiao_lin Date: Thu, 9 May 2024 14:54:37 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=88=A0=E6=8E=89=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Contro.tsx | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/src/components/Contro.tsx b/src/components/Contro.tsx index 6dd43e9..2177b8d 100644 --- a/src/components/Contro.tsx +++ b/src/components/Contro.tsx @@ -60,7 +60,7 @@ export const Contro: React.FC = () => { setConnected(false); setAutoFindFailedReason("Yakit WebSocket Controller Connect Fail"); localStorage.setItem("yakit-connect", ""); - return + return; } if (e.reason !== `FoundYakitWebSocketController` && port + 1 <= max) { setTimeout(() => findPort(port + 1, max), 200); @@ -161,23 +161,19 @@ export const Contro: React.FC = () => { {safeConnected && ( - - wsc.disconnect()} /> - + wsc.disconnect()} /> )} {failConnected && ( - - { - if (enginePort) { - connectPort(Number(enginePort)); - } else { - findPort(11212, 11222); - } - }} - /> - + { + if (enginePort) { + connectPort(Number(enginePort)); + } else { + findPort(11212, 11222); + } + }} + /> )}