fix(hooks): add missing dependencies to hook dependency arrays

Add providerId to useAddOpenAIVideo and t to useProviderVideos dependency arrays to prevent stale closures
This commit is contained in:
icarus 2025-10-13 23:08:31 +08:00
parent b068fc25da
commit 09ed82eb49
2 changed files with 2 additions and 2 deletions

View File

@ -58,7 +58,7 @@ export const useAddOpenAIVideo = (providerId: string) => {
break break
} }
}, },
[addVideo] [addVideo, providerId]
) )
return addOpenAIVideo return addOpenAIVideo

View File

@ -160,7 +160,7 @@ export const useProviderVideos = (providerId: string) => {
}) })
} }
}) })
}, [data, error, provider, providerId, retrieveThumbnail, setVideo]) }, [data, error, provider, providerId, retrieveThumbnail, setVideo, t])
return { return {
videos: videos ?? [], videos: videos ?? [],