diff options
| author | Haishan <[email protected]> | 2020-06-20 22:33:50 +0800 |
|---|---|---|
| committer | Haishan <[email protected]> | 2020-06-20 22:33:50 +0800 |
| commit | c600c7840a948fa810564c944ddcf6884551ecbf (patch) | |
| tree | c1870c86a7cd543f5ea8b71243a2a4c1d945a1f2 /src/components | |
| parent | 632c6a37350c830902046546fc07ce764ca009a0 (diff) | |
fix: fix color display for unavailable proxy item
Diffstat (limited to 'src/components')
| -rw-r--r-- | src/components/proxies/Proxy.tsx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/components/proxies/Proxy.tsx b/src/components/proxies/Proxy.tsx index 31dcadb..d456da5 100644 --- a/src/components/proxies/Proxy.tsx +++ b/src/components/proxies/Proxy.tsx @@ -1,7 +1,7 @@ import cx from 'clsx'; import * as React from 'react'; -import { getDelay,getProxies, NonProxyTypes } from '../../store/proxies'; +import { getDelay, getProxies, NonProxyTypes } from '../../store/proxies'; import { connect } from '../StateProvider'; import s0 from './Proxy.module.css'; import { ProxyLatency } from './ProxyLatency'; @@ -24,7 +24,9 @@ function getLabelColor({ }: { number?: number; } = {}) { - if (number < 200) { + if (number === 0) { + return colorMap.na; + } else if (number < 200) { return colorMap.good; } else if (number < 400) { return colorMap.normal; |
