-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(BSR) feat(cheactodes): add subscreens others in cheatcodes menu
- Loading branch information
1 parent
6a97b0b
commit 419dfa1
Showing
4 changed files
with
90 additions
and
52 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
43 changes: 26 additions & 17 deletions
43
src/cheatcodes/pages/others/CheatcodesNavigationAccountManagement.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 |
---|---|---|
@@ -1,26 +1,35 @@ | ||
import React from 'react' | ||
|
||
import { CheatcodesSubscreensButtonList } from 'cheatcodes/components/CheatcodesSubscreenButtonList' | ||
import { CheatcodesTemplateScreen } from 'cheatcodes/components/CheatcodesTemplateScreen' | ||
import { LinkToScreen } from 'cheatcodes/components/LinkToScreen' | ||
import { CheatcodesButtonsWithSubscreensProps } from 'cheatcodes/types' | ||
|
||
export const cheatcodesNavigationAccountManagementButtons: [CheatcodesButtonsWithSubscreensProps] = | ||
[ | ||
{ | ||
title: 'Account Management ⚙️', | ||
screen: 'CheatcodesNavigationAccountManagement', | ||
subscreens: [ | ||
{ screen: 'FraudulentSuspendedAccount' }, | ||
{ screen: 'SuspendedAccountUponUserRequest' }, | ||
{ screen: 'AccountReactivationSuccess' }, | ||
{ screen: 'DeleteProfileReason' }, | ||
{ screen: 'ConfirmDeleteProfile' }, | ||
{ screen: 'DeactivateProfileSuccess' }, | ||
{ screen: 'DeleteProfileSuccess' }, | ||
{ screen: 'DeleteProfileConfirmation' }, | ||
{ screen: 'ResetPasswordExpiredLink' }, | ||
{ screen: 'DeleteProfileAccountNotDeletable' }, | ||
{ screen: 'DeleteProfileAccountHacked' }, | ||
{ screen: 'ResetPasswordEmailSent', navigationParams: { email: '[email protected]' } }, | ||
], | ||
}, | ||
] | ||
|
||
export function CheatcodesNavigationAccountManagement(): React.JSX.Element { | ||
return ( | ||
<CheatcodesTemplateScreen title="Account Management ⚙️"> | ||
<LinkToScreen screen="FraudulentSuspendedAccount" /> | ||
<LinkToScreen screen="SuspendedAccountUponUserRequest" /> | ||
<LinkToScreen screen="AccountReactivationSuccess" /> | ||
<LinkToScreen screen="DeleteProfileReason" /> | ||
<LinkToScreen screen="ConfirmDeleteProfile" /> | ||
<LinkToScreen screen="DeactivateProfileSuccess" /> | ||
<LinkToScreen screen="DeleteProfileSuccess" /> | ||
<LinkToScreen screen="DeleteProfileConfirmation" /> | ||
<LinkToScreen screen="ResetPasswordExpiredLink" /> | ||
<LinkToScreen | ||
screen="ResetPasswordEmailSent" | ||
navigationParams={{ email: '[email protected]' }} | ||
/> | ||
<LinkToScreen screen="DeleteProfileAccountNotDeletable" /> | ||
<LinkToScreen screen="DeleteProfileAccountHacked" /> | ||
<CheatcodesTemplateScreen title={cheatcodesNavigationAccountManagementButtons[0].title}> | ||
<CheatcodesSubscreensButtonList buttons={cheatcodesNavigationAccountManagementButtons} /> | ||
</CheatcodesTemplateScreen> | ||
) | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,44 @@ | ||
import React from 'react' | ||
|
||
import { CheatcodesSubscreensButtonList } from 'cheatcodes/components/CheatcodesSubscreenButtonList' | ||
import { CheatcodesTemplateScreen } from 'cheatcodes/components/CheatcodesTemplateScreen' | ||
import { LinkToScreen } from 'cheatcodes/components/LinkToScreen' | ||
import { useSomeOfferId } from 'cheatcodes/hooks/useSomeOfferId' | ||
import { CheatcodesButtonsWithSubscreensProps } from 'cheatcodes/types' | ||
import { StepperOrigin } from 'features/navigation/RootNavigator/types' | ||
import { ApplicationProcessingModal } from 'shared/offer/components/ApplicationProcessingModal/ApplicationProcessingModal' | ||
import { AuthenticationModal } from 'shared/offer/components/AuthenticationModal/AuthenticationModal' | ||
import { ErrorApplicationModal } from 'shared/offer/components/ErrorApplicationModal/ErrorApplicationModal' | ||
import { FinishSubscriptionModal } from 'shared/offer/components/FinishSubscriptionModal/FinishSubscriptionModal' | ||
import { useModal } from 'ui/components/modals/useModal' | ||
|
||
export const cheatcodesNavigationSignUpButtons: [CheatcodesButtonsWithSubscreensProps] = [ | ||
{ | ||
title: 'SignUp 🎨', | ||
screen: 'CheatcodesNavigationSignUp', | ||
subscreens: [ | ||
{ screen: 'AccountCreated' }, | ||
{ screen: 'BeneficiaryAccountCreated' }, | ||
{ screen: 'SignupConfirmationExpiredLink', navigationParams: { email: '[email protected]' } }, | ||
{ | ||
screen: 'NotYetUnderageEligibility', | ||
navigationParams: { | ||
eligibilityStartDatetime: new Date('2019-12-01T00:00:00Z').toString(), | ||
}, | ||
}, | ||
|
||
{ | ||
screen: 'AfterSignupEmailValidationBuffer', | ||
navigationParams: { | ||
token: 'whichTokenDoYouWantReally', | ||
expiration_timestamp: 456789123, | ||
email: '[email protected]', | ||
}, | ||
}, | ||
], | ||
}, | ||
] | ||
|
||
export function CheatcodesNavigationSignUp(): React.JSX.Element { | ||
const offerId = useSomeOfferId() | ||
|
||
|
@@ -38,46 +67,31 @@ export function CheatcodesNavigationSignUp(): React.JSX.Element { | |
} = useModal(false) | ||
|
||
return ( | ||
<CheatcodesTemplateScreen title="SignUp 🎨"> | ||
<LinkToScreen | ||
screen="SignupConfirmationExpiredLink" | ||
navigationParams={{ email: '[email protected]' }} | ||
/> | ||
<LinkToScreen | ||
screen="AfterSignupEmailValidationBuffer" | ||
navigationParams={{ | ||
token: 'whichTokenDoYouWantReally', | ||
expiration_timestamp: 456789123, | ||
email: '[email protected]', | ||
}} | ||
/> | ||
<LinkToScreen screen="AccountCreated" /> | ||
<LinkToScreen screen="BeneficiaryAccountCreated" /> | ||
<LinkToScreen | ||
screen="NotYetUnderageEligibility" | ||
navigationParams={{ | ||
eligibilityStartDatetime: new Date('2019-12-01T00:00:00Z').toString(), | ||
}} | ||
/> | ||
<CheatcodesTemplateScreen title={cheatcodesNavigationSignUpButtons[0].title}> | ||
<CheatcodesSubscreensButtonList buttons={cheatcodesNavigationSignUpButtons} /> | ||
|
||
<LinkToScreen title="Finish subscription modal" onPress={showFinishSubscriptionModal} /> | ||
<FinishSubscriptionModal | ||
visible={finishSubscriptionModalVisible} | ||
hideModal={hideFinishSubscriptionModal} | ||
from={StepperOrigin.OFFER} | ||
/> | ||
|
||
<LinkToScreen title="Authentication modal from offer" onPress={showAuthenticationModal} /> | ||
<AuthenticationModal | ||
visible={authenticationModalVisible} | ||
hideModal={hideAuthenticationModal} | ||
offerId={offerId} | ||
from={StepperOrigin.FAVORITE} | ||
/> | ||
|
||
<LinkToScreen title="Application Processing Modal" onPress={showApplicationProcessingModal} /> | ||
<ApplicationProcessingModal | ||
visible={applicationProcessingModalVisible} | ||
hideModal={hideApplicationProcessingModal} | ||
offerId={offerId} | ||
/> | ||
|
||
<LinkToScreen title="Error Application Modal" onPress={showErrorApplicationModal} /> | ||
<ErrorApplicationModal | ||
visible={errorApplicationModalVisible} | ||
|