mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-20 00:08:02 +01:00
29 lines
1.1 KiB
TypeScript
29 lines
1.1 KiB
TypeScript
|
import { ConfiguredAddons } from './ConfiguredAddons/ConfiguredAddons';
|
||
|
import { AvailableAddons } from './AvailableAddons/AvailableAddons';
|
||
|
import { ConditionallyRender } from 'component/common/ConditionallyRender/ConditionallyRender';
|
||
|
import useAddons from 'hooks/api/getters/useAddons/useAddons';
|
||
|
import useUiConfig from 'hooks/api/getters/useUiConfig/useUiConfig';
|
||
|
import { AvailableIntegrations } from './AvailableIntegrations/AvailableIntegrations';
|
||
|
|
||
|
export const IntegrationList = () => {
|
||
|
const { providers, addons, loading } = useAddons();
|
||
|
const { uiConfig } = useUiConfig();
|
||
|
const integrationsRework = uiConfig?.flags?.integrationsRework || false;
|
||
|
|
||
|
return (
|
||
|
<>
|
||
|
<ConditionallyRender
|
||
|
condition={addons.length > 0}
|
||
|
show={<ConfiguredAddons />}
|
||
|
/>
|
||
|
<ConditionallyRender
|
||
|
condition={integrationsRework}
|
||
|
show={<AvailableIntegrations />}
|
||
|
elseShow={
|
||
|
<AvailableAddons loading={loading} providers={providers} />
|
||
|
}
|
||
|
/>
|
||
|
</>
|
||
|
);
|
||
|
};
|