From 0ace99f43e2a5a8826f7a5bd2c42785d0b8ed490 Mon Sep 17 00:00:00 2001
From: Bastien Dumont <bdumont@grandlyon.com>
Date: Wed, 3 Apr 2024 15:34:36 +0200
Subject: [PATCH] easier render Connection

---
 src/components/Konnector/KonnectorViewerCard.tsx | 16 ++++------------
 1 file changed, 4 insertions(+), 12 deletions(-)

diff --git a/src/components/Konnector/KonnectorViewerCard.tsx b/src/components/Konnector/KonnectorViewerCard.tsx
index 1099621b9..6d5173501 100644
--- a/src/components/Konnector/KonnectorViewerCard.tsx
+++ b/src/components/Konnector/KonnectorViewerCard.tsx
@@ -272,19 +272,13 @@ const KonnectorViewerCard = ({
         />
       )
     }
-
-    if (isGRDFWaitingForConsent) return
-
-    return <Connection fluidType={currentFluidStatus.fluidType} />
   }, [
     account,
-    currentFluidStatus.fluidType,
     currentFluidStatus.status,
     fluidSlug,
     fluidState,
     fluidType,
     handleAccountDeletion,
-    isGRDFWaitingForConsent,
     isUpdating,
     showOfflineData,
     t,
@@ -479,13 +473,12 @@ const KonnectorViewerCard = ({
     trigger,
   ])
 
-  // if (isGRDFWaitingForConsent) return
-
   return (
     <div className="konnector-section-root">
-      {isDisconnected &&
-        // Why render accordion details without accordion ?
-        getConnectionCard()}
+      {isDisconnected && (
+        <Connection fluidType={currentFluidStatus.fluidType} />
+      )}
+
       {!isDisconnected && (
         <Accordion
           expanded={showConnectionDetails}
@@ -531,7 +524,6 @@ const KonnectorViewerCard = ({
           </AccordionDetails>
         </Accordion>
       )}
-      {/* Why render this if !isDisconnected => isConnected. Might be necessary */}
       <KonnectorModal
         open={openModal}
         isUpdating={isUpdating}
-- 
GitLab