From 8e1d6b420fb99544a885c114af0cb8a239535abd Mon Sep 17 00:00:00 2001 From: Simon Larsen Date: Fri, 7 Feb 2025 19:10:30 +0000 Subject: [PATCH] feat: enhance SlackIntegration component with connection handlers and improve notification rule naming --- .../ServiceProviderNotificationRulesTable.tsx | 2 ++ Dashboard/src/Components/Slack/SlackIntegration.tsx | 2 -- Dashboard/src/Pages/UserSettings/SlackIntegration.tsx | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Dashboard/src/Components/ServiceProvider/ServiceProviderNotificationRulesTable.tsx b/Dashboard/src/Components/ServiceProvider/ServiceProviderNotificationRulesTable.tsx index a51959bbcf..60a4ebf7c3 100644 --- a/Dashboard/src/Components/ServiceProvider/ServiceProviderNotificationRulesTable.tsx +++ b/Dashboard/src/Components/ServiceProvider/ServiceProviderNotificationRulesTable.tsx @@ -317,6 +317,8 @@ const ServiceProviderNotificationRuleTable: FunctionComponent< projectId: DashboardNavigation.getProjectId()!, eventType: props.eventType, }} + singularName={`${props.eventType} Notification Rule`} + pluralName={`${props.eventType} Notification Rules`} id="servie-provider-table" name="Settings > Service Provider Notification Rules" isDeleteable={true} diff --git a/Dashboard/src/Components/Slack/SlackIntegration.tsx b/Dashboard/src/Components/Slack/SlackIntegration.tsx index 82395aa370..7fcd9bf4f9 100644 --- a/Dashboard/src/Components/Slack/SlackIntegration.tsx +++ b/Dashboard/src/Components/Slack/SlackIntegration.tsx @@ -53,8 +53,6 @@ const SlackIntegration: FunctionComponent = (props: ComponentPro setIsProjectAccountConnected, ] = React.useState(false); const [isButtonLoading, setIsButtonLoading] = React.useState(false); - - useEffect(() => { if(isProjectAccountConnected){ diff --git a/Dashboard/src/Pages/UserSettings/SlackIntegration.tsx b/Dashboard/src/Pages/UserSettings/SlackIntegration.tsx index 0738f5bad7..8c9ca24d85 100644 --- a/Dashboard/src/Pages/UserSettings/SlackIntegration.tsx +++ b/Dashboard/src/Pages/UserSettings/SlackIntegration.tsx @@ -3,7 +3,10 @@ import React, { FunctionComponent, ReactElement } from "react"; import SlackIntegration from "../../Components/Slack/SlackIntegration"; const Settings: FunctionComponent = (): ReactElement => { - return ; + return {}} + onDisconnected={()=>{}} + />; }; export default Settings;