RocketChat/Rocket.Chat

View on GitHub
apps/meteor/client/hooks/useShouldPreventAction.ts

Summary

Maintainability
A
0 mins
Test Coverage
import type { LicenseLimitKind } from '@rocket.chat/core-typings';

import { useLicense } from './useLicense';

export const useShouldPreventAction = (action: LicenseLimitKind): boolean => {
    const { data: { preventedActions } = {} } = useLicense();

    return Boolean(preventedActions?.[action]);
};