From e6facf11758500ebddb4b534f5e843fd8f016476 Mon Sep 17 00:00:00 2001 From: Zephyruso <127948745+Zephyruso@users.noreply.github.com> Date: Tue, 5 Sep 2023 19:48:28 +0800 Subject: [PATCH] fix: rule provider word break --- src/pages/Proxies.tsx | 5 +---- src/pages/ProxyProvider.tsx | 11 ++++------- src/pages/Rules.tsx | 10 +++++----- 3 files changed, 10 insertions(+), 16 deletions(-) diff --git a/src/pages/Proxies.tsx b/src/pages/Proxies.tsx index bde536b..dc5ae09 100644 --- a/src/pages/Proxies.tsx +++ b/src/pages/Proxies.tsx @@ -37,10 +37,7 @@ export default () => { const onSpeedTestClick = async (e: MouseEvent, name: string) => { e.stopPropagation() - setSpeedTestingMap( - name, - async () => await latencyTestByProxyGroupName(name), - ) + setSpeedTestingMap(name, () => latencyTestByProxyGroupName(name)) } return ( diff --git a/src/pages/ProxyProvider.tsx b/src/pages/ProxyProvider.tsx index 2660a1e..58fb7d8 100644 --- a/src/pages/ProxyProvider.tsx +++ b/src/pages/ProxyProvider.tsx @@ -34,17 +34,14 @@ export default () => { useStringBooleanMap() const [allProviderIsUpdating, setAllProviderIsUpdating] = createSignal(false) - const onHealthCheckClick = async (e: MouseEvent, name: string) => { + const onHealthCheckClick = (e: MouseEvent, name: string) => { e.stopPropagation() - setHealthCheckingMap( - name, - async () => await healthCheckByProviderName(name), - ) + setHealthCheckingMap(name, () => healthCheckByProviderName(name)) } - const onUpdateProviderClick = async (e: MouseEvent, name: string) => { + const onUpdateProviderClick = (e: MouseEvent, name: string) => { e.stopPropagation() - setUpdateingMap(name, async () => await updateProviderByProviderName(name)) + setUpdateingMap(name, () => updateProviderByProviderName(name)) } const onUpdateAllProviderClick = async (e: MouseEvent) => { diff --git a/src/pages/Rules.tsx b/src/pages/Rules.tsx index 9501d28..0c94313 100644 --- a/src/pages/Rules.tsx +++ b/src/pages/Rules.tsx @@ -40,7 +40,7 @@ export default () => { } return ( -