diff --git a/src/app/auth/signup/index.tsx b/src/app/auth/signup/index.tsx index f75aeab..17608b4 100644 --- a/src/app/auth/signup/index.tsx +++ b/src/app/auth/signup/index.tsx @@ -1,20 +1,20 @@ import { Link, router } from 'expo-router'; import { useEffect, useRef, useState } from 'react'; -import { Alert, Text, View } from 'react-native'; +import { Alert, KeyboardAvoidingView, Text, View } from 'react-native'; import { Icon as RNEIcon } from 'react-native-elements'; import { ScrollView } from 'react-native-gesture-handler'; import { SafeAreaView } from 'react-native-safe-area-context'; import validator from 'validator'; import styles from './styles'; +import PasswordComplexityText from '../../../components/PasswordComplexityText/PasswordComplexityText'; import StyledButton from '../../../components/StyledButton/StyledButton'; import UserStringInput from '../../../components/UserStringInput/UserStringInput'; -import PasswordComplexityText from '../../../components/PasswordComplexityText/PasswordComplexityText'; +import { isEmailTaken } from '../../../queries/profiles'; import colors from '../../../styles/colors'; import globalStyles from '../../../styles/globalStyles'; import { useSession } from '../../../utils/AuthContext'; import supabase from '../../../utils/supabase'; -import { isEmailTaken } from '../../../queries/profiles'; function SignUpScreen() { const { signUp } = useSession(); @@ -143,133 +143,134 @@ function SignUpScreen() { style={[globalStyles.authContainer]} edges={['right', 'left', 'top']} > - - - - {'Read stories from \nyoung creators'} - - - - {usernameError && ( - - {usernameError} + + + + + {'Read stories from \nyoung creators'} - )} - setFirstName(text.replaceAll(/[^a-zA-Z]/g, ''))} - value={firstName} - /> - setLastName(text.replaceAll(/[^a-zA-Z]/g, ''))} - value={lastName} - /> - - {emailError && ( - - {emailError} - - )} - - { - setPassword(text); - checkPassword(text); - }} - value={password} - attributes={{ - textContentType: 'password', - secureTextEntry: passwordTextHidden, - }} - > - setPasswordTextHidden(!passwordTextHidden)} + - - - {password !== '' && ( - - )} - {password !== '' && ( - - )} - {password !== '' && ( - - )} - {password !== '' && ( - - )} + {usernameError && ( + + {usernameError} + + )} - - - + + + {emailError && ( + + {emailError} + + )} + + { + setPassword(text); + checkPassword(text); + }} + value={password} + attributes={{ + textContentType: 'password', + secureTextEntry: passwordTextHidden, + }} + > + setPasswordTextHidden(!passwordTextHidden)} + /> + - - Already have an account? - - Log In - + {password !== '' && ( + + )} + {password !== '' && ( + + )} + {password !== '' && ( + + )} + {password !== '' && ( + + )} + + + + + + + Already have an account? + + Log In + + - - + + ); } diff --git a/src/styles/globalStyles.ts b/src/styles/globalStyles.ts index 3a104cf..f85e826 100644 --- a/src/styles/globalStyles.ts +++ b/src/styles/globalStyles.ts @@ -127,7 +127,6 @@ export default StyleSheet.create({ textAlign: 'left', color: 'black', }, - subtext: { fontFamily: 'Manrope-Regular', fontSize: 12,