From ddb39068b10fcf6734b6caa96b9c75aced44f838 Mon Sep 17 00:00:00 2001 From: Bastien Dumont <bdumont@grandlyon.com> Date: Wed, 27 Mar 2024 16:24:46 +0100 Subject: [PATCH] add default error --- src/components/Connection/GRDFConnect/GrdfConnectView.tsx | 1 + src/components/Konnector/KonnectorModal.tsx | 3 +-- src/components/Konnector/KonnectorViewerCard.tsx | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/Connection/GRDFConnect/GrdfConnectView.tsx b/src/components/Connection/GRDFConnect/GrdfConnectView.tsx index 8fc09abbe..0d0ae1ae8 100644 --- a/src/components/Connection/GRDFConnect/GrdfConnectView.tsx +++ b/src/components/Connection/GRDFConnect/GrdfConnectView.tsx @@ -42,6 +42,7 @@ export const GrdfConnectView = () => { pceConfirm: true, }) + // TODO move this in GrdfInit ? const [connect, update] = useKonnectorAuth(FluidType.GAS, { grdfAuthData: formData, }) diff --git a/src/components/Konnector/KonnectorModal.tsx b/src/components/Konnector/KonnectorModal.tsx index 75e829613..e315f39d6 100644 --- a/src/components/Konnector/KonnectorModal.tsx +++ b/src/components/Konnector/KonnectorModal.tsx @@ -265,8 +265,7 @@ const KonnectorModal = ({ </div> )} {error !== KonnectorError.LOGIN_FAILED && - error !== KonnectorError.TERMS_VERSION_MISMATCH && - error !== KonnectorError.CHALLENGE_ASKED && ( + error !== KonnectorError.TERMS_VERSION_MISMATCH && ( // DEFAULT CASE <div className="konnector-config"> <Icon icon={errorIcon} size={48} /> diff --git a/src/components/Konnector/KonnectorViewerCard.tsx b/src/components/Konnector/KonnectorViewerCard.tsx index 67c44349b..28a6f38d0 100644 --- a/src/components/Konnector/KonnectorViewerCard.tsx +++ b/src/components/Konnector/KonnectorViewerCard.tsx @@ -78,6 +78,7 @@ const KonnectorViewerCard = ({ const fluidState = currentFluidStatus.status const { konnector, account, trigger } = currentFluidStatus.connection const currentFluidName = FluidType[currentFluidStatus.fluidType].toLowerCase() + const [openModal, setOpenModal] = useState(false) const [isUpdating, setIsUpdating] = useState(false) // TODO rename to isVerifyingIdentity @@ -88,6 +89,7 @@ const KonnectorViewerCard = ({ useState<KonnectorError | null>(null) const [konnectorState, setKonnectorState] = useState<string | null>(null) const [isOutdatedData, setIsOutdatedData] = useState<number | null>(null) + const fluidService = useMemo(() => new FluidService(client), [client]) const partnersInfoService = useMemo( () => new PartnersInfoService(client), -- GitLab