Skip to content

Commit 9eb51c5

Browse files
authored
Merge pull request #666 from topcoder-platform/accounts-app
MP-40 QA fixes -> dev
2 parents 58d3ad8 + b0586fb commit 9eb51c5

File tree

2 files changed

+24
-12
lines changed

2 files changed

+24
-12
lines changed

src/apps/accounts/src/settings/tabs/account/security/Security.tsx

+22-10
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import { Dispatch, FC, SetStateAction, useEffect, useState } from 'react'
22
import { toast } from 'react-toastify'
33
import { KeyedMutator } from 'swr'
4+
import { noop } from 'lodash'
45

5-
import { Button, Collapsible, FormToggleSwitch, IconOutline, Tooltip } from '~/libs/ui'
6+
import { Button, Collapsible, FormToggleSwitch, IconSolid, Tooltip } from '~/libs/ui'
67
import { diceIdLogo, MFAImage, SettingSection } from '~/apps/accounts/src/lib'
78
import { MemberMFAStatus, updateMemberMFAStatusAsync, useMemberMFAStatus, UserProfile } from '~/libs/core'
89

@@ -83,20 +84,31 @@ const Security: FC<SecurityProps> = (props: SecurityProps) => {
8384
infoText='DICE ID authentication application.'
8485
actionElement={(
8586
<div className={styles.diceBtnWrap}>
86-
<Button
87-
label='Setup DICE ID Authentication'
88-
secondary
89-
size='lg'
90-
className={styles.diceIdButton}
91-
onClick={handleDiceModalStatus}
92-
disabled={!mfaEnabled || mfaStatusData?.diceEnabled}
93-
/>
87+
{
88+
!mfaStatusData?.diceEnabled ? (
89+
<FormToggleSwitch
90+
name='diceEnabled'
91+
onChange={noop}
92+
value={mfaStatusData?.diceEnabled as boolean}
93+
disabled={mfaStatusData?.diceEnabled}
94+
/>
95+
) : (
96+
<Button
97+
label='Setup DICE ID Authentication'
98+
secondary
99+
size='lg'
100+
className={styles.diceIdButton}
101+
onClick={handleDiceModalStatus}
102+
disabled={!mfaEnabled}
103+
/>
104+
)
105+
}
94106
{
95107
mfaStatusData?.diceEnabled && (
96108
<Tooltip
97109
content='Please reach out to [email protected] for deactivating Dice ID.'
98110
>
99-
<IconOutline.InformationCircleIcon />
111+
<IconSolid.InformationCircleIcon />
100112
</Tooltip>
101113
)
102114
}

src/apps/accounts/src/settings/tabs/account/security/dice-setup-modal/DiceSetupModal.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ const DiceSetupModal: FC<DiceSetupModalProps> = (props: DiceSetupModalProps) =>
266266
https://www.diceid.com
267267
</a>
268268
</p>
269-
<p>Please click Finish bellow.</p>
269+
<p>Please click Finish below.</p>
270270
</>
271271
)
272272
}
@@ -293,7 +293,7 @@ const DiceSetupModal: FC<DiceSetupModalProps> = (props: DiceSetupModalProps) =>
293293
<br />
294294
<br />
295295
</p>
296-
<p>Please click Finish bellow.</p>
296+
<p>Please click Finish below.</p>
297297
</>
298298
)
299299
}

0 commit comments

Comments
 (0)