mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-31 00:16:47 +01:00
16 lines
468 B
TypeScript
16 lines
468 B
TypeScript
import { lazy } from 'react';
|
|
import useUiConfig from '../../../hooks/api/getters/useUiConfig/useUiConfig';
|
|
|
|
export const LazyLegacyPlayground = lazy(() => import('./Playground'));
|
|
export const LazyAdvancedPlayground = lazy(
|
|
() => import('./AdvancedPlayground')
|
|
);
|
|
|
|
export const LazyPlayground = () => {
|
|
const { uiConfig } = useUiConfig();
|
|
|
|
if (uiConfig.flags.advancedPlayground) return <LazyAdvancedPlayground />;
|
|
|
|
return <LazyLegacyPlayground />;
|
|
};
|