The communications platform that puts data protection first.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Rocket.Chat/apps/meteor/client/hooks/useLicense.ts

14 lines
547 B

import type { OperationResult } from '@rocket.chat/rest-typings';
import { useEndpoint } from '@rocket.chat/ui-contexts';
import type { UseQueryResult } from '@tanstack/react-query';
import { useQuery } from '@tanstack/react-query';
export const useLicense = (): UseQueryResult<OperationResult<'GET', '/v1/licenses.get'>> => {
const getLicenses = useEndpoint('GET', '/v1/licenses.get');
return useQuery(['licenses', 'getLicenses'], () => getLicenses(), {
staleTime: Infinity,
keepPreviousData: true,
refetchOnWindowFocus: false,
});
};