diff options
| author | ipcjs <[email protected]> | 2023-02-19 05:04:14 +0800 |
|---|---|---|
| committer | kunish <[email protected]> | 2023-02-19 11:23:20 +0800 |
| commit | 67d692e0596c2fbbd313405da1185854c6d80ec3 (patch) | |
| tree | d5d66ea5080024c7c69b81d3828c34c3d9a003cb /src | |
| parent | 5ae2e631f69e924d7cf3134425405d83e36452f4 (diff) | |
fix: show history latency
Diffstat (limited to 'src')
| -rw-r--r-- | src/components/proxies/Proxy.tsx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/components/proxies/Proxy.tsx b/src/components/proxies/Proxy.tsx index 00f7c6b..3d19e6f 100644 --- a/src/components/proxies/Proxy.tsx +++ b/src/components/proxies/Proxy.tsx @@ -172,6 +172,8 @@ function ProxyImpl({ now, name, proxy, latency, isSelectable, onClick }: ProxyPr }); }, [isSelectable, now, latency]); + const latencyNumber = latency?.number ?? proxy.history[proxy.history.length - 1]?.delay; + return ( <div tabIndex={0} @@ -198,7 +200,7 @@ function ProxyImpl({ now, name, proxy, latency, isSelectable, onClick }: ProxyPr {formatTfo(proxy.tfo)} </div> - {latency && latency.number ? <ProxyLatency number={latency.number} color={color} /> : null} + {latencyNumber ? <ProxyLatency number={latencyNumber} color={color} /> : null} </div> </div> ); |
