mirror of
https://github.com/datahub-project/datahub.git
synced 2025-08-17 05:37:05 +00:00
12 lines
435 B
TypeScript
12 lines
435 B
TypeScript
import { useMemo } from 'react';
|
|
import buildEntityRegistry from './buildEntityRegistry';
|
|
import buildEntityRegistryV2 from './buildEntityRegistryV2';
|
|
import { useIsThemeV2 } from './useIsThemeV2';
|
|
|
|
export default function useBuildEntityRegistry() {
|
|
const isThemeV2Enabled = useIsThemeV2();
|
|
return useMemo(() => {
|
|
return isThemeV2Enabled ? buildEntityRegistryV2() : buildEntityRegistry();
|
|
}, [isThemeV2Enabled]);
|
|
}
|