mirror of
https://github.com/Unleash/unleash.git
synced 2025-10-13 11:17:26 +02:00
new page for available integrations
This commit is contained in:
parent
7ccacbe89e
commit
9e480adf22
@ -38,6 +38,9 @@ interface IAvailableAddonsProps {
|
|||||||
loading: boolean;
|
loading: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated Remove when integrationsRework flag is removed
|
||||||
|
*/
|
||||||
export const AvailableAddons = ({
|
export const AvailableAddons = ({
|
||||||
providers,
|
providers,
|
||||||
loading,
|
loading,
|
||||||
|
@ -7,6 +7,9 @@ interface IConfigureAddonsButtonProps {
|
|||||||
provider: IAddonProvider;
|
provider: IAddonProvider;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated Remove when integrationsRework flag is removed
|
||||||
|
*/
|
||||||
export const ConfigureAddonsButton = ({
|
export const ConfigureAddonsButton = ({
|
||||||
provider,
|
provider,
|
||||||
}: IConfigureAddonsButtonProps) => {
|
}: IConfigureAddonsButtonProps) => {
|
||||||
|
@ -0,0 +1,11 @@
|
|||||||
|
import { PageContent } from "component/common/PageContent/PageContent"
|
||||||
|
import { VFC } from "react"
|
||||||
|
|
||||||
|
interface IAvailableIntegrationsProps {}
|
||||||
|
|
||||||
|
export const AvailableIntegrations: VFC<IAvailableIntegrationsProps> = () => {
|
||||||
|
|
||||||
|
return (
|
||||||
|
<PageContent>Available integrations</PageContent>
|
||||||
|
)
|
||||||
|
}
|
@ -17,6 +17,9 @@ import { IntegrationIcon } from '../IntegrationIcon/IntegrationIcon';
|
|||||||
import { ConfiguredAddonsActionsCell } from './ConfiguredAddonsActionCell/ConfiguredAddonsActionsCell';
|
import { ConfiguredAddonsActionsCell } from './ConfiguredAddonsActionCell/ConfiguredAddonsActionsCell';
|
||||||
import { IntegrationNameCell } from '../IntegrationNameCell/IntegrationNameCell';
|
import { IntegrationNameCell } from '../IntegrationNameCell/IntegrationNameCell';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated Remove when integrationsRework flag is removed
|
||||||
|
*/
|
||||||
export const ConfiguredAddons = () => {
|
export const ConfiguredAddons = () => {
|
||||||
const { refetchAddons, addons, providers, loading } = useAddons();
|
const { refetchAddons, addons, providers, loading } = useAddons();
|
||||||
const { updateAddon, removeAddon } = useAddonsApi();
|
const { updateAddon, removeAddon } = useAddonsApi();
|
||||||
|
@ -18,6 +18,9 @@ interface IConfiguredAddonsActionsCellProps {
|
|||||||
setDeletedAddon: React.Dispatch<React.SetStateAction<IAddon>>;
|
setDeletedAddon: React.Dispatch<React.SetStateAction<IAddon>>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated Remove when integrationsRework flag is removed
|
||||||
|
*/
|
||||||
export const ConfiguredAddonsActionsCell = ({
|
export const ConfiguredAddonsActionsCell = ({
|
||||||
toggleAddon,
|
toggleAddon,
|
||||||
setShowDelete,
|
setShowDelete,
|
||||||
|
@ -3,6 +3,7 @@ import { AvailableAddons } from './AvailableAddons/AvailableAddons';
|
|||||||
import { ConditionallyRender } from 'component/common/ConditionallyRender/ConditionallyRender';
|
import { ConditionallyRender } from 'component/common/ConditionallyRender/ConditionallyRender';
|
||||||
import useAddons from 'hooks/api/getters/useAddons/useAddons';
|
import useAddons from 'hooks/api/getters/useAddons/useAddons';
|
||||||
import useUiConfig from 'hooks/api/getters/useUiConfig/useUiConfig';
|
import useUiConfig from 'hooks/api/getters/useUiConfig/useUiConfig';
|
||||||
|
import { AvailableIntegrations } from './AvailableIntegrations/AvailableIntegrations';
|
||||||
|
|
||||||
export const IntegrationList = () => {
|
export const IntegrationList = () => {
|
||||||
const { providers, addons, loading } = useAddons();
|
const { providers, addons, loading } = useAddons();
|
||||||
@ -15,7 +16,13 @@ export const IntegrationList = () => {
|
|||||||
condition={addons.length > 0}
|
condition={addons.length > 0}
|
||||||
show={<ConfiguredAddons />}
|
show={<ConfiguredAddons />}
|
||||||
/>
|
/>
|
||||||
<AvailableAddons loading={loading} providers={providers} />
|
<ConditionallyRender
|
||||||
|
condition={integrationsRework}
|
||||||
|
show={<AvailableIntegrations />}
|
||||||
|
elseShow={
|
||||||
|
<AvailableAddons loading={loading} providers={providers} />
|
||||||
|
}
|
||||||
|
/>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
@ -17,6 +17,9 @@ interface IIntegrationNameCellProps {
|
|||||||
>;
|
>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated Remove when integrationsRework flag is removed
|
||||||
|
*/
|
||||||
export const IntegrationNameCell = ({ provider }: IIntegrationNameCellProps) => (
|
export const IntegrationNameCell = ({ provider }: IIntegrationNameCellProps) => (
|
||||||
<HighlightCell
|
<HighlightCell
|
||||||
value={provider.displayName}
|
value={provider.displayName}
|
||||||
|
Loading…
Reference in New Issue
Block a user