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/ee/client/views/admin/users/useSeatsCap.ts

21 lines
453 B

import { useEndpointData } from '../../../../../client/hooks/useEndpointData';
export const useSeatsCap = ():
| {
maxActiveUsers: number;
activeUsers: number;
reload: () => void;
}
| undefined => {
const { value, reload } = useEndpointData('licenses.maxActiveUsers');
if (!value) {
return undefined;
}
return {
activeUsers: value.activeUsers,
maxActiveUsers: value.maxActiveUsers ?? Number.POSITIVE_INFINITY,
reload,
};
};