test: fix getModels test case does not work with useDebounce

This commit is contained in:
Louis 2024-10-22 20:33:56 +07:00
parent 03333cc4c2
commit 6c0c2a00d6
No known key found for this signature in database
GPG Key ID: 44FA9F4D33C37DE2

View File

@ -59,7 +59,7 @@ const useModels = () => {
useEffect(() => {
// Try get data on mount
reloadData()
getData()
// Listen for model updates
events.on(ModelEvent.OnModelsUpdate, async () => reloadData())
@ -67,7 +67,7 @@ const useModels = () => {
// Remove listener on unmount
events.off(ModelEvent.OnModelsUpdate, async () => {})
}
}, [reloadData])
}, [getData, reloadData])
}
const getModels = async (): Promise<Model[]> =>