Skip to content

Commit

Permalink
Disallow sign up until valid username and email
Browse files Browse the repository at this point in the history
  • Loading branch information
adityapawar1 committed Nov 8, 2023
1 parent 24cd6cf commit 0b277e7
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/app/auth/signup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,6 @@ function SignUpScreen() {
setLoading(false);
};

if (session) {
return <Redirect href="/home" />;
}

return (
<View style={globalStyles.auth_container}>
<Text style={[globalStyles.h3, globalStyles.mt20]}>
Expand Down Expand Up @@ -149,14 +145,18 @@ function SignUpScreen() {
style={styles.inputField}
placeholder="Enter Password"
autoCapitalize="none"
secureTextEntry
secureTextEntry={true}
textContentType="password"
/>
</View>

<Link href="/auth/login">Already have an account? Log In</Link>
<View style={[globalStyles.verticallySpaced, globalStyles.mt20]}>
<Button title="Sign Up" disabled={loading} onPress={signUpWithEmail} />
<Button
title="Sign Up"
disabled={loading || emailError == '' || usernameError == ''}
onPress={signUpWithEmail}
/>
</View>
</View>
);
Expand Down

0 comments on commit 0b277e7

Please sign in to comment.