Skip to content
Snippets Groups Projects
Commit a989d601 authored by Bastien DUMONT's avatar Bastien DUMONT :angel:
Browse files

rename prop to isVerifyingIdentity

parent 173892d7
No related branches found
No related tags found
2 merge requests!1154feat: GRDF consent email,!1137feat(grdf)!: update error messages
......@@ -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()}
/>
......
......@@ -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">
......
......@@ -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}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment