diff --git a/src/page/home/index.tsx b/src/page/home/index.tsx index 5e5fb5b..54c2c30 100644 --- a/src/page/home/index.tsx +++ b/src/page/home/index.tsx @@ -24,7 +24,7 @@ export default function Home() { const [query, setQuery] = useState("$.staff_members[*].name") const [copied, setCopied] = useState(false) - // 计算匹配结果 + // Compute matching results const result = useMemo(() => { let parsed try { @@ -43,12 +43,12 @@ export default function Home() { queryError: null, } } catch (e) { - // JSONPath 表达式无效时,仍显示 JSON 树,但无匹配 + // When JSONPath expression is invalid, still display the JSON tree but with no matches return { parsed, matchedPaths: [], matchedValues: [], error: null, queryError: (e as Error).message } } }, [jsonInput, query]) - // 复制为 CSV + // Copy as CSV const copyAsCsv = useCallback(() => { if (result.matchedValues.length === 0) return @@ -72,7 +72,7 @@ export default function Home() { return (
- {/* 左侧输入面板 - 40% */} + {/* Left input panel - 40% */}
@@ -109,7 +109,7 @@ export default function Home() {
- {/* 右侧可视化面板 - 60% */} + {/* Right visualisation panel - 60% */}