feat(All) 修改结果展示样式,增加测试地区覆盖范围
This commit is contained in:
@@ -12,11 +12,11 @@ function AppContent() {
|
||||
const [results, setResults] = useState<Map<string, LatencyResult>>(new Map())
|
||||
const [testing, setTesting] = useState(false)
|
||||
|
||||
const handleTest = useCallback(async (ip: string) => {
|
||||
const handleTest = useCallback(async (target: string) => {
|
||||
setTesting(true)
|
||||
setResults(new Map())
|
||||
|
||||
await testAllNodes(ip, (result) => {
|
||||
await testAllNodes(target, (result) => {
|
||||
setResults((prev) => new Map(prev).set(result.nodeId, result))
|
||||
})
|
||||
|
||||
@@ -35,7 +35,7 @@ function AppContent() {
|
||||
|
||||
<main className="app-main">
|
||||
<p className="app-description">
|
||||
Test network latency from global locations to any IP address
|
||||
Test network latency from global locations to any IP address or domain
|
||||
</p>
|
||||
<IpInput onTest={handleTest} testing={testing} />
|
||||
<LatencyMap results={results} />
|
||||
|
||||
Reference in New Issue
Block a user