mirror of
https://github.com/Unleash/unleash.git
synced 2025-04-01 01:18:10 +02:00
15 lines
467 B
TypeScript
15 lines
467 B
TypeScript
import { fetcher, useApiGetter } from '../useApiGetter/useApiGetter';
|
|
import { OutdatedSdksSchema } from '../../../../openapi';
|
|
|
|
const PATH = 'api/admin/metrics/sdks/outdated';
|
|
|
|
export const useOutdatedSdks = () => {
|
|
const { data, refetch, loading, error } = useApiGetter<OutdatedSdksSchema>(
|
|
PATH,
|
|
() => fetcher(PATH, 'Outdated SDKs'),
|
|
{ refreshInterval: 60 * 1000 },
|
|
);
|
|
|
|
return { data: data || { sdks: [] }, refetch, error };
|
|
};
|