Skip to content

Commit

Permalink
Merge pull request #50790 from software-mansion-labs/@zfurtak/fix-ani…
Browse files Browse the repository at this point in the history
…mation-in-2FA-modal

Enable ending animation in `RequireTwoFactorAuthenticationModal`
  • Loading branch information
mountiny authored Oct 22, 2024
2 parents d329b9c + 194adfa commit e5e0da2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/components/ConnectToXeroFlow/index.native.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ function ConnectToXeroFlow({policyID}: ConnectToXeroFlowProps) {

return (
<>
{isRequire2FAModalOpen && (
{!is2FAEnabled && (
<RequireTwoFactorAuthenticationModal
onSubmit={() => {
setIsRequire2FAModalOpen(false);
Navigation.navigate(ROUTES.SETTINGS_2FA.getRoute(ROUTES.POLICY_ACCOUNTING.getRoute(policyID), getXeroSetupLink(policyID)));
}}
onCancel={() => setIsRequire2FAModalOpen(false)}
isVisible
isVisible={isRequire2FAModalOpen}
description={translate('twoFactorAuth.twoFactorAuthIsRequiredDescription')}
/>
)}
Expand Down
4 changes: 2 additions & 2 deletions src/components/ConnectToXeroFlow/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function ConnectToXeroFlow({policyID}: ConnectToXeroFlowProps) {
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);

if (isRequire2FAModalOpen) {
if (!is2FAEnabled) {
return (
<RequireTwoFactorAuthenticationModal
onSubmit={() => {
Expand All @@ -39,7 +39,7 @@ function ConnectToXeroFlow({policyID}: ConnectToXeroFlowProps) {
onCancel={() => {
setIsRequire2FAModalOpen(false);
}}
isVisible
isVisible={isRequire2FAModalOpen}
description={translate('twoFactorAuth.twoFactorAuthIsRequiredDescription')}
/>
);
Expand Down
1 change: 1 addition & 0 deletions src/components/RequireTwoFactorAuthenticationModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ function RequireTwoFactorAuthenticationModal({onCancel = () => {}, description,
type={shouldUseNarrowLayout ? CONST.MODAL.MODAL_TYPE.BOTTOM_DOCKED : CONST.MODAL.MODAL_TYPE.CONFIRM}
innerContainerStyle={{...styles.pb5, ...styles.pt3, ...styles.boxShadowNone}}
shouldEnableNewFocusManagement={shouldEnableNewFocusManagement}
animationOutTiming={500}
>
<View style={safeAreaPaddingBottomStyle}>
<View
Expand Down

0 comments on commit e5e0da2

Please sign in to comment.