fix(frontend): resolve TypeScript errors in TracePage
- Fix if-else missing semicolon (TS1005) - Fix useRef missing initial value (TS2554)
This commit is contained in:
1 parent
4e2e81f684
commit
5b2bcc9441
1 file changed
+2
-2
@@ -23,7 +23,7 @@ export default function TracePage() {
|
|||||||
const [traces, setTraces] = useState<any[]>([])
|
const [traces, setTraces] = useState<any[]>([])
|
||||||
const [expanded, setExpanded] = useState<Set<string>>(new Set())
|
const [expanded, setExpanded] = useState<Set<string>>(new Set())
|
||||||
const [selected, setSelected] = useState<any>(null)
|
const [selected, setSelected] = useState<any>(null)
|
||||||
const intervalRef = useRef<number>()
|
const intervalRef = useRef<number>(0)
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
fetchTraces()
|
fetchTraces()
|
||||||
@@ -42,7 +42,7 @@ export default function TracePage() {
|
|||||||
|
|
||||||
const toggleExpand = (id: string) => {
|
const toggleExpand = (id: string) => {
|
||||||
const next = new Set(expanded)
|
const next = new Set(expanded)
|
||||||
if (next.has(id)) next.delete(id) else next.add(id)
|
if (next.has(id)) next.delete(id); else next.add(id)
|
||||||
setExpanded(next)
|
setExpanded(next)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user