datahub/datahub-web-react/src/app/useAppConfig.ts
Chris Collins 85fa5a1c4f
feat(ui/java) Update domains to be nested (#8841)
Allow the ability to now nest domains underneath other domains. This should work much like the business glossary where you can add domains underneath other domains, move domains underneath other domains or at the root, and navigate domains using a nice new navigator.
2023-09-18 16:14:33 -04:00

20 lines
528 B
TypeScript

import { useContext } from 'react';
import { AppConfigContext } from '../appConfigContext';
/**
* Fetch an instance of AppConfig from the React context.
*/
export function useAppConfig() {
return useContext(AppConfigContext);
}
export function useIsShowAcrylInfoEnabled() {
const appConfig = useAppConfig();
return appConfig.config.featureFlags.showAcrylInfo;
}
export function useIsNestedDomainsEnabled() {
const appConfig = useAppConfig();
return appConfig.config.featureFlags.nestedDomainsEnabled;
}