diff --git a/keep-ui/app/providers/providers-tiles.tsx b/keep-ui/app/providers/providers-tiles.tsx index 378bae0a7..f83e41c9b 100644 --- a/keep-ui/app/providers/providers-tiles.tsx +++ b/keep-ui/app/providers/providers-tiles.tsx @@ -76,7 +76,7 @@ const ProvidersTiles = ({ const handleConnectProvider = (provider: Provider) => { // on linked providers, don't open the modal - if(provider.linked) return; + if (provider.linked) return; hideOrShowIntercom(true); setSelectedProvider(provider); @@ -101,46 +101,44 @@ const ProvidersTiles = ({ if (isConnected) handleCloseModal(); }; - const providersWithConfig = providers - .filter((provider) => { - const config = (provider as Provider).config; - // Filter out providers with empty config and providers that support webhooks - return (config && Object.keys(config).length > 0) || (provider.supports_webhook); - }) - .sort( - (a, b) => - Number(b.can_setup_webhook) - Number(a.can_setup_webhook) || - Number(b.supports_webhook) - Number(a.supports_webhook) || - Number(b.oauth2_url ? true : false) - - Number(a.oauth2_url ? true : false) - ) as Providers; - return (
- - {installedProvidersMode ? "Installed Providers" : linkedProvidersMode ? "Linked Providers" : "Available Providers"} - - {linkedProvidersMode && ( -
- -
- )} -
+ + {installedProvidersMode + ? "Installed Providers" + : linkedProvidersMode + ? "Linked Providers" + : "Available Providers"} + + {linkedProvidersMode && ( +
+ +
+ )} +
- {providers.map((provider, index) => ( - handleConnectProvider(provider)} - > - ))} + {providers + .sort( + (a, b) => + Number(b.can_setup_webhook) - Number(a.can_setup_webhook) || + Number(b.supports_webhook) - Number(a.supports_webhook) || + Number(b.oauth2_url ? true : false) - + Number(a.oauth2_url ? true : false) + ) + .map((provider) => ( + handleConnectProvider(provider)} + > + ))}
- {properties.alert && Object.keys(properties.alert as {}).map((filter) => { - return ( - <> - {filter} -
- - updateAlertFilter(filter, e.target.value) - } - value={(properties.alert as any)[filter] as string} - /> - deleteFilter(filter)} - /> -
- - ); - })} + {properties.alert && + Object.keys(properties.alert as {}).map((filter) => { + return ( + <> + {filter} +
+ + updateAlertFilter(filter, e.target.value) + } + value={(properties.alert as any)[filter] as string} + /> + deleteFilter(filter)} + /> +
+ + ); + })} ) : (