Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sign Up Page #204

Merged
merged 13 commits into from
Apr 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion client/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,6 @@ yarn-error.*
.env*.local

# typescript
*.tsbuildinfo
*.tsbuildinfo

.prettierrc
4 changes: 4 additions & 0 deletions client/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"tabWidth": 2,
"useTabs": false
}
4 changes: 3 additions & 1 deletion client/src/components/Auth/AuthenticationResponse.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,12 @@ const decodeFirebaseError = (error: FirebaseError) => {
return "Too many requests, please try again later";
case "auth/email-already-in-use":
return "Email already in use";
case "auth/invalid-email":
return "Invalid email";
default:
return "Unknown error";
}
}
};

const decodeCustomError = (error: CustomError) => {
return error.message;
Expand Down
18 changes: 9 additions & 9 deletions client/src/components/Auth/LoginScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import {
Keyboard,
TouchableOpacity,
} from "react-native";
import { LogInEmailInput, LogInPasswordInput } from "../Common/CustomInputs";
import { LogInButton, ExternalLoginButton } from "../Common/AuthButtons";
import { EmailInput, PasswordInput } from "../Common/CustomInputs";
import { LogInButton, ExternalAuthButton } from "../Common/AuthButtons";
import { useLocalSearchParams, useRouter } from "expo-router";
import { appSignIn } from "../../services/store";
import {
Expand Down Expand Up @@ -101,12 +101,12 @@ const LoginScreen = () => {
<Text style={styles.subheader_text}>How have you been?</Text>
</View>
<View style={styles.input_container}>
<LogInEmailInput
<EmailInput
value={email}
onChangeText={(text) => setEmail(text)}
invalid={invalidLogin}
/>
<LogInPasswordInput
<PasswordInput
value={password}
onChangeText={(text) => setPassword(text)}
invalid={invalidLogin}
Expand All @@ -133,19 +133,19 @@ const LoginScreen = () => {
</View>

<View style={styles.externalLinkContainer}>
<ExternalLoginButton
<ExternalAuthButton
onPress={handleGoogleSignIn}
companyName="google"
/>
<ExternalLoginButton
<ExternalAuthButton
onPress={handleAppleSignIn}
companyName="apple"
/>
<ExternalLoginButton
<ExternalAuthButton
onPress={handleFacebookSignIn}
companyName="facebook"
/>
<ExternalLoginButton
<ExternalAuthButton
onPress={handleGithubSignIn}
companyName="github"
/>
Expand Down Expand Up @@ -213,7 +213,7 @@ const styles = StyleSheet.create({
width: "100%",
justifyContent: "space-around",
alignItems: "center",
height: Dimensions.get("window").height * 0.15,
gap: Dimensions.get("window").height * 0.02,
},

button_container: {
Expand Down
Loading
Loading