mirror of
https://github.com/coder/coder.git
synced 2026-11-06 16:33:10 +08:00
9 lines
352 B
TypeScript
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);
|
|
};
|