MCPcopy Create free account
hub / github.com/bytebase/bytebase / usePlanFeature

Function usePlanFeature

frontend/src/react/hooks/useAppState.ts:226–233  ·  view source on GitHub ↗
(feature: PlanFeature)

Source from the content-addressed store, hash-verified

224}
225
226export function usePlanFeature(feature: PlanFeature) {
227 const loadSubscription = useAppStore((state) => state.loadSubscription);
228 const hasFeature = useAppStore((state) => state.hasFeature(feature));
229 useEffect(() => {
230 void loadSubscription();
231 }, [loadSubscription]);
232 return hasFeature;
233}
234
235export function useWorkspacePermission(permission: Permission) {
236 const allowed = useAppStore((state) =>

Callers 13

AuditLogTableFunction · 0.90
WatermarkFunction · 0.90
BannerAnnouncementFunction · 0.90
EnvironmentLabelFunction · 0.90
EnvironmentResourceLinkFunction · 0.90
DatabaseTableViewFunction · 0.90
DatabaseDetailHeaderFunction · 0.90

Calls 1

useAppStoreFunction · 0.50

Tested by

no test coverage detected