Skip to content

Commit

Permalink
add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Ladirico committed Jan 24, 2024
1 parent f413074 commit 1f32088
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions ts/screens/profile/CduEmailInsertScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,15 @@ const CduEmailInsertScreen = (props: Props) => {
};

const handleOnChangeEmailText = (value: string) => {
/**
* SCENARIOS:
* 1. first onboarding and email already taken => if the CIT write
* the same email as the one he has to modify, he is blocked
* 2. first onboarding and NOT email already taken => the email
* with which he/she is logged in is valid and the CIT is not blocked
* 3. Not first onboarding => if the CIT write the same email as the one
* he already send, he is blocked.
*/
if (isFirstOnBoarding) {
setAreSameEmails(
isProfileEmailAlreadyTaken
Expand Down Expand Up @@ -378,6 +387,8 @@ const CduEmailInsertScreen = (props: Props) => {
}
inputProps={{
returnKeyType: "done",
// continueOnPress is called by pressing the
// button on the keyboard only if the mail is valid
onSubmitEditing: isButtonDisabled
? undefined
: continueOnPress,
Expand Down

0 comments on commit 1f32088

Please sign in to comment.