Skip to content

Commit

Permalink
fix: show history latency
Browse files Browse the repository at this point in the history
  • Loading branch information
ipcjs authored and kunish committed Feb 19, 2023
1 parent 5ae2e63 commit 67d692e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/proxies/Proxy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand All @@ -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>
);
Expand Down

0 comments on commit 67d692e

Please sign in to comment.