forked from binary-com/deriv-app
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[WALL] Sergei / wall 3020 / Reset investor password design change (bi…
…nary-com#12070) * feat: implement design for reset investor password * feat: move email screen outside of the tabs * refactor: change empty tag to Fragment * feat: implement review suggestions * feat: implement review suggestions 2
- Loading branch information
1 parent
aa3006a
commit 96039c9
Showing
8 changed files
with
112 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,7 @@ | |
width: 100%; | ||
} | ||
|
||
&__reasons { | ||
&__resend { | ||
align-items: center; | ||
display: flex; | ||
flex-direction: column; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 57 additions & 0 deletions
57
packages/wallets/src/features/cfd/screens/ChangePassword/MT5ChangePasswordScreens.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
import React, { Fragment, useState } from 'react'; | ||
import { Trans } from 'react-i18next'; | ||
import { SentEmailContent } from '../../../../components'; | ||
import { Tab, Tabs, WalletText } from '../../../../components/Base'; | ||
import IcBackArrow from '../../../../public/images/ic-back-arrow.svg'; | ||
import { PlatformDetails } from '../../constants'; | ||
import MT5ChangeInvestorPasswordScreens from './InvestorPassword/MT5ChangeInvestorPasswordScreens'; | ||
import TradingPlatformChangePasswordScreens from './TradingPlatformChangePasswordScreens'; | ||
|
||
const MT5ChangePasswordScreens = () => { | ||
const [showSentEmailContentWithoutTabs, setShowSentEmailContentWithoutTabs] = useState(false); | ||
const [tabNumber, setTabNumber] = useState(0); | ||
|
||
const platform = PlatformDetails.mt5.platform; | ||
const { title } = PlatformDetails[platform]; | ||
|
||
return showSentEmailContentWithoutTabs ? ( | ||
<Fragment> | ||
<div | ||
className='wallets-change-password__back-arrow' | ||
onClick={() => { | ||
setShowSentEmailContentWithoutTabs(false); | ||
setTabNumber(1); | ||
}} | ||
onKeyDown={event => { | ||
if (event.key === 'Enter') { | ||
setShowSentEmailContentWithoutTabs(false); | ||
setTabNumber(1); | ||
} | ||
}} | ||
> | ||
<IcBackArrow /> | ||
<WalletText weight='bold'> | ||
<Trans defaults='Back' /> | ||
</WalletText> | ||
</div> | ||
|
||
<div className='wallets-change-investor-password-screens__sent-email-wrapper'> | ||
<SentEmailContent | ||
description='Please click on the link in the email to reset your password.' | ||
isInvestorPassword | ||
/> | ||
</div> | ||
</Fragment> | ||
) : ( | ||
<Tabs preSelectedTab={tabNumber} wrapperClassName='wallets-change-password__tab'> | ||
<Tab title={`${title} Password`}> | ||
<TradingPlatformChangePasswordScreens platform={platform} /> | ||
</Tab> | ||
<Tab title='Investor Password'> | ||
<MT5ChangeInvestorPasswordScreens setShowEmailSentScreen={setShowSentEmailContentWithoutTabs} /> | ||
</Tab> | ||
</Tabs> | ||
); | ||
}; | ||
|
||
export default MT5ChangePasswordScreens; |