1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-08-09 13:47:13 +02:00

new page for available integrations

This commit is contained in:
Tymoteusz Czech 2023-08-18 13:00:04 +02:00
parent 7ccacbe89e
commit 9e480adf22
No known key found for this signature in database
GPG Key ID: 133555230D88D75F
7 changed files with 34 additions and 1 deletions

View File

@ -38,6 +38,9 @@ interface IAvailableAddonsProps {
loading: boolean;
}
/**
* @deprecated Remove when integrationsRework flag is removed
*/
export const AvailableAddons = ({
providers,
loading,

View File

@ -7,6 +7,9 @@ interface IConfigureAddonsButtonProps {
provider: IAddonProvider;
}
/**
* @deprecated Remove when integrationsRework flag is removed
*/
export const ConfigureAddonsButton = ({
provider,
}: IConfigureAddonsButtonProps) => {

View File

@ -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>
)
}

View File

@ -17,6 +17,9 @@ import { IntegrationIcon } from '../IntegrationIcon/IntegrationIcon';
import { ConfiguredAddonsActionsCell } from './ConfiguredAddonsActionCell/ConfiguredAddonsActionsCell';
import { IntegrationNameCell } from '../IntegrationNameCell/IntegrationNameCell';
/**
* @deprecated Remove when integrationsRework flag is removed
*/
export const ConfiguredAddons = () => {
const { refetchAddons, addons, providers, loading } = useAddons();
const { updateAddon, removeAddon } = useAddonsApi();

View File

@ -18,6 +18,9 @@ interface IConfiguredAddonsActionsCellProps {
setDeletedAddon: React.Dispatch<React.SetStateAction<IAddon>>;
}
/**
* @deprecated Remove when integrationsRework flag is removed
*/
export const ConfiguredAddonsActionsCell = ({
toggleAddon,
setShowDelete,

View File

@ -3,6 +3,7 @@ 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();
@ -15,7 +16,13 @@ export const IntegrationList = () => {
condition={addons.length > 0}
show={<ConfiguredAddons />}
/>
<AvailableAddons loading={loading} providers={providers} />
<ConditionallyRender
condition={integrationsRework}
show={<AvailableIntegrations />}
elseShow={
<AvailableAddons loading={loading} providers={providers} />
}
/>
</>
);
};

View File

@ -17,6 +17,9 @@ interface IIntegrationNameCellProps {
>;
}
/**
* @deprecated Remove when integrationsRework flag is removed
*/
export const IntegrationNameCell = ({ provider }: IIntegrationNameCellProps) => (
<HighlightCell
value={provider.displayName}