Skip to content

Commit

Permalink
conditionally render based on active tab
Browse files Browse the repository at this point in the history
  • Loading branch information
tienifr committed Oct 17, 2023
1 parent 79ab418 commit ed21eb5
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions src/pages/signin/SignInPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -243,16 +243,20 @@ function SignInPage({credentials, account, isInModal, activeClients}) {
blurOnSubmit={account.validated === false}
scrollPageToTop={signInPageLayoutRef.current && signInPageLayoutRef.current.scrollPageToTop}
/>
{shouldShowValidateCodeForm && (
<ValidateCodeForm
isUsingRecoveryCode={isUsingRecoveryCode}
setIsUsingRecoveryCode={setIsUsingRecoveryCode}
setIsUsingMagicCode={setIsUsingMagicCode}
/>
{isClientTheLeader && (
<>
{shouldShowValidateCodeForm && (
<ValidateCodeForm
isUsingRecoveryCode={isUsingRecoveryCode}
setIsUsingRecoveryCode={setIsUsingRecoveryCode}
setIsUsingMagicCode={setIsUsingMagicCode}
/>
)}
{shouldShowUnlinkLoginForm && <UnlinkLoginForm />}
{shouldShowChooseSSOOrMagicCode && <ChooseSSOOrMagicCode setIsUsingMagicCode={setIsUsingMagicCode} />}
{shouldShowEmailDeliveryFailurePage && <EmailDeliveryFailurePage />}
</>
)}
{shouldShowUnlinkLoginForm && <UnlinkLoginForm />}
{shouldShowChooseSSOOrMagicCode && <ChooseSSOOrMagicCode setIsUsingMagicCode={setIsUsingMagicCode} />}
{shouldShowEmailDeliveryFailurePage && <EmailDeliveryFailurePage />}
</SignInPageLayout>
</View>
);
Expand Down

0 comments on commit ed21eb5

Please sign in to comment.