diff --git a/src/components/Konnector/KonnectorModal.spec.tsx b/src/components/Konnector/KonnectorModal.spec.tsx index 8d44aeb3ac913e9d41ac3e3bc3cffe5955fded39..9a454deb8b21fe8614e7e484fd1a4b3292608171 100644 --- a/src/components/Konnector/KonnectorModal.spec.tsx +++ b/src/components/Konnector/KonnectorModal.spec.tsx @@ -23,7 +23,7 @@ describe('KonnectorModal component', () => { error={null} fluidType={FluidType.ELECTRICITY} handleCloseClick={mockHandleCloseClick} - isLogging={false} + isVerifyingIdentity={false} account={null} handleAccountDeletion={jest.fn()} /> @@ -41,7 +41,7 @@ describe('KonnectorModal component', () => { error={null} fluidType={FluidType.ELECTRICITY} handleCloseClick={mockHandleCloseClick} - isLogging={false} + isVerifyingIdentity={false} account={null} handleAccountDeletion={jest.fn()} /> @@ -61,7 +61,7 @@ describe('KonnectorModal component', () => { error={null} fluidType={FluidType.ELECTRICITY} handleCloseClick={mockHandleCloseClick} - isLogging={false} + isVerifyingIdentity={false} account={null} handleAccountDeletion={jest.fn()} /> @@ -80,7 +80,7 @@ describe('KonnectorModal component', () => { error={KonnectorError.LOGIN_FAILED} fluidType={FluidType.ELECTRICITY} handleCloseClick={mockHandleCloseClick} - isLogging={false} + isVerifyingIdentity={false} account={null} handleAccountDeletion={jest.fn()} /> @@ -100,7 +100,7 @@ describe('KonnectorModal component', () => { error={null} fluidType={FluidType.ELECTRICITY} handleCloseClick={mockHandleCloseClick} - isLogging={false} + isVerifyingIdentity={false} account={null} handleAccountDeletion={jest.fn()} /> @@ -120,7 +120,7 @@ describe('KonnectorModal component', () => { error={null} fluidType={FluidType.WATER} handleCloseClick={mockHandleCloseClick} - isLogging={false} + isVerifyingIdentity={false} account={null} handleAccountDeletion={jest.fn()} /> diff --git a/src/components/Konnector/KonnectorModal.tsx b/src/components/Konnector/KonnectorModal.tsx index ecd76ee804ad911ba443edb3868f7c3c8c905067..3603d32aab9f1ce79c60fe84684b86342fecc77b 100644 --- a/src/components/Konnector/KonnectorModal.tsx +++ b/src/components/Konnector/KonnectorModal.tsx @@ -25,7 +25,7 @@ interface KonnectorModalProps { open: boolean isUpdating: boolean /** Only used for SGE when searching for user identity */ - isLogging: boolean + isVerifyingIdentity: boolean state: string | null error: KonnectorError | null fluidType: FluidType @@ -37,7 +37,7 @@ interface KonnectorModalProps { const KonnectorModal = ({ open, isUpdating, - isLogging, + isVerifyingIdentity, state, error, fluidType, @@ -83,7 +83,7 @@ const KonnectorModal = ({ const getConnectionText = useCallback(() => { return ( <div className="kmodal-waiting-text text-18-italic"> - {isLogging ? ( + {isVerifyingIdentity ? ( <p className="text-18-white">{t('konnector_modal.logging_txt')}</p> ) : ( firstConnectionWaitingTexts.map((text, idx) => ( @@ -100,7 +100,7 @@ const KonnectorModal = ({ )} </div> ) - }, [firstConnectionWaitingTexts, index, isLogging, t]) + }, [firstConnectionWaitingTexts, index, isVerifyingIdentity, t]) /** Returns connection success contents, depending on the fluid and update status */ const connectionSuccessContent = () => ( @@ -163,7 +163,7 @@ const KonnectorModal = ({ {!state ? ( <> <Loader fluidType={fluidType} /> - {!isLogging && ( + {!isVerifyingIdentity && ( <div className="kmodal-content-text text-16-normal"> {/* TODO remove kc-wait */} <div className="kc-wait text-16-bold"> diff --git a/src/components/Konnector/KonnectorViewerCard.tsx b/src/components/Konnector/KonnectorViewerCard.tsx index 9dc3a0e17fd890f2320c87690b71116ba87fed14..1099621b9d20d66909083666f12594b06b8ec1c0 100644 --- a/src/components/Konnector/KonnectorViewerCard.tsx +++ b/src/components/Konnector/KonnectorViewerCard.tsx @@ -82,8 +82,7 @@ const KonnectorViewerCard = ({ const [openModal, setOpenModal] = useState(false) const [isUpdating, setIsUpdating] = useState(false) - // TODO rename to isVerifyingIdentity - const [isLogging, setIsLogging] = useState( + const [isVerifyingIdentity, setIsVerifyingIdentity] = useState( fluidType === FluidType.ELECTRICITY ) const [konnectorErrorDescription, setKonnectorErrorDescription] = @@ -448,7 +447,7 @@ const KonnectorViewerCard = ({ callbackResponse(ERROR_EVENT) }) connectionFlow.jobWatcher.on(LOGIN_SUCCESS_EVENT, () => { - setIsLogging(false) + setIsVerifyingIdentity(false) }) connectionFlow.jobWatcher.on(SUCCESS_EVENT, () => { callbackResponse(SUCCESS_EVENT) @@ -536,7 +535,7 @@ const KonnectorViewerCard = ({ <KonnectorModal open={openModal} isUpdating={isUpdating} - isLogging={isLogging} + isVerifyingIdentity={isVerifyingIdentity} state={konnectorState} error={konnectorErrorDescription} fluidType={fluidType}