test: fix getModels test case does not work with useDebounce
This commit is contained in:
parent
03333cc4c2
commit
6c0c2a00d6
@ -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[]> =>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user