From 7f71124b5ad7554199d68b4de07ebb463b9485db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89mile=20R=C3=A9?= Date: Sat, 31 Jan 2026 13:38:53 +0400 Subject: [PATCH] Fix slack connection empty case MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Émile Ré --- .../CompliancePageSlackSection.tsx | 67 ++++++++++--------- 1 file changed, 35 insertions(+), 32 deletions(-) diff --git a/apps/console/src/pages/organizations/compliance-page/overview/_components/CompliancePageSlackSection.tsx b/apps/console/src/pages/organizations/compliance-page/overview/_components/CompliancePageSlackSection.tsx index 9acae58ce..47af85ad9 100644 --- a/apps/console/src/pages/organizations/compliance-page/overview/_components/CompliancePageSlackSection.tsx +++ b/apps/console/src/pages/organizations/compliance-page/overview/_components/CompliancePageSlackSection.tsx @@ -44,46 +44,49 @@ export function CompliancePageSlackSection(props: { fragmentRef: CompliancePageS className="flex items-center gap-3" >
- +

Slack

- {slackConnection.createdAt - ? ( - <> - {sprintf( - __("Connected on %s"), - dateTimeFormat(slackConnection.createdAt), - )} - {slackConnection.channel && ( - <> - {" • "} - {sprintf(__("Channel: %s"), slackConnection.channel)} - - )} - - ) - : __("Manage your compliance page access with slack")} + {sprintf( + __("Connected on %s"), + dateTimeFormat(slackConnection.createdAt), + )} + {slackConnection.channel && ( + <> + {" • "} + {sprintf(__("Channel: %s"), slackConnection.channel)} + + )}

- {slackConnection.createdAt - ? ( -
- - {__("Connected")} - -
- ) - : ( - organization.compliancePage?.canUpdate && ( - - ) - )} +
+ + {__("Connected")} + +
))} + {organization.compliancePage?.canUpdate && organization.slackConnections.edges.length === 0 && ( + +
+ +
+
+

Slack

+

+ {__("Manage your compliance page access with slack")} +

+
+ +
+ )}