mirror of
https://github.com/Crosstalk-Solutions/project-nomad.git
synced 2026-03-27 19:19:25 +01:00
fix(ui): ref issue in benchmark page
This commit is contained in:
parent
a4de8d05f7
commit
8e84ece2ef
|
|
@ -40,7 +40,7 @@ export default function BenchmarkPage(props: {
|
|||
const aiInstalled = useServiceInstalledStatus(SERVICE_NAMES.OLLAMA)
|
||||
const [progress, setProgress] = useState<BenchmarkProgressWithID | null>(null)
|
||||
const [isRunning, setIsRunning] = useState(props.benchmark.status !== 'idle')
|
||||
const refetchLatestRef = useRef(refetchLatest)
|
||||
const refetchLatestRef = useRef<(() => void) | null>(null)
|
||||
const [showDetails, setShowDetails] = useState(false)
|
||||
const [showHistory, setShowHistory] = useState(false)
|
||||
const [showAIRequiredAlert, setShowAIRequiredAlert] = useState(false)
|
||||
|
|
@ -308,7 +308,7 @@ export default function BenchmarkPage(props: {
|
|||
setProgress(data)
|
||||
if (data.status === 'completed' || data.status === 'error') {
|
||||
setIsRunning(false)
|
||||
refetchLatestRef.current()
|
||||
refetchLatestRef.current?.()
|
||||
}
|
||||
})
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user