mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
9 lines
372 B
TypeScript
9 lines
372 B
TypeScript
import { FeatureName } from "api/typesGenerated"
|
|
import { useDashboard } from "components/Dashboard/DashboardProvider"
|
|
import { selectFeatureVisibility } from "xServices/entitlements/entitlementsSelectors"
|
|
|
|
export const useFeatureVisibility = (): Record<FeatureName, boolean> => {
|
|
const { entitlements } = useDashboard()
|
|
return selectFeatureVisibility(entitlements)
|
|
}
|