1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-31 00:16:47 +01:00
unleash.unleash/frontend/src/component/playground/Playground/LazyPlayground.tsx

16 lines
468 B
TypeScript
Raw Normal View History

import { lazy } from 'react';
import useUiConfig from '../../../hooks/api/getters/useUiConfig/useUiConfig';
2023-06-19 14:02:30 +02:00
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 />;
};