Update webview-ui/src/components/ui/hooks/useRequestyKeyInfo.ts

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
This commit is contained in:
John Costa 2025-08-21 14:07:30 +01:00 committed by GitHub
parent f0a5bd68da
commit e74ca6fbd7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -45,7 +45,7 @@ async function getRequestyKeyInfo(baseUrl?: string, apiKey?: string) {
type UseRequestyKeyInfoOptions = Omit<UseQueryOptions<RequestyKeyInfo | null>, "queryKey" | "queryFn">
export const useRequestyKeyInfo = (baseUrl?: string, apiKey?: string, options?: UseRequestyKeyInfoOptions) => {
return useQuery<RequestyKeyInfo | null>({
queryKey: ["requesty-key-info", apiKey],
queryKey: ["requesty-key-info", baseUrl, apiKey],
queryFn: () => getRequestyKeyInfo(baseUrl, apiKey),
staleTime: 30 * 1000, // 30 seconds
enabled: !!apiKey,