Skip to content

Commit

Permalink
Fix small bugs in sign up and create password
Browse files Browse the repository at this point in the history
  • Loading branch information
adityapawar1 committed Mar 19, 2024
1 parent 826f5ba commit 28513fe
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
11 changes: 7 additions & 4 deletions src/app/auth/resetPassword/index.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
import { Link, router } from 'expo-router';
import React, { useEffect, useRef, useState } from 'react';
import { router } from 'expo-router';
import { useEffect, useState } from 'react';
import { Alert, Text, View } from 'react-native';
import { Icon as RNEIcon } from 'react-native-elements';

import styles from './styles';
import Icon from '../../../../assets/icons';
import StyledButton from '../../../components/StyledButton/StyledButton';
import UserStringInput from '../../../components/UserStringInput/UserStringInput';
import colors from '../../../styles/colors';
import globalStyles from '../../../styles/globalStyles';
import { useSession } from '../../../utils/AuthContext';
import PasswordComplexityText from '../../../components/PasswordComplexityText/PasswordComplexityText';
import supabase from '../../../utils/supabase';

function ResetPasswordScreen() {
const { updateUser, signOut } = useSession();
Expand Down Expand Up @@ -43,6 +41,11 @@ function ResetPasswordScreen() {
setHasNumber(/[0-9]/.test(text));
setHasLength(text.length >= 8);
//need to check that it is different from old password
} else {
setHasUppercase(false);
setHasLowercase(false);
setHasNumber(false);
setHasLength(false);
}
};

Expand Down
3 changes: 2 additions & 1 deletion src/app/auth/signup/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { SafeAreaView } from 'react-native-safe-area-context';
import validator from 'validator';

import styles from './styles';
import Icon from '../../../../assets/icons';
import StyledButton from '../../../components/StyledButton/StyledButton';
import UserStringInput from '../../../components/UserStringInput/UserStringInput';
import PasswordComplexityText from '../../../components/PasswordComplexityText/PasswordComplexityText';
Expand Down Expand Up @@ -255,6 +254,8 @@ function SignUpScreen() {
loading ||
emailError !== '' ||
usernameError !== '' ||
firstName.length === 0 ||
lastName.length === 0 ||
email.length === 0 ||
username.length === 0
}
Expand Down

0 comments on commit 28513fe

Please sign in to comment.