Files
coder/site/src/hooks/useFeatureVisibility.ts
T

9 lines
352 B
TypeScript

import { FeatureName } from "api/typesGenerated";
import { useDashboard } from "components/Dashboard/DashboardProvider";
import { selectFeatureVisibility } from "utils/entitlements";
export const useFeatureVisibility = (): Record<FeatureName, boolean> => {
const { entitlements } = useDashboard();
return selectFeatureVisibility(entitlements);
};