working, needs testing on physical device

This commit is contained in:
Loewy 2024-02-08 13:02:18 -08:00
parent 6b8737e182
commit 3b1abc9ae8
2 changed files with 8 additions and 6 deletions

View File

@ -30,19 +30,22 @@ export const confirmCode = async (
}
};
export const createOrSignInUser = (
export const createOrSignInUser = async (
email: string,
password: string,
isSignUp: boolean,
) => {
console.log("isSignUp", isSignUp);
try {
if (isSignUp) {
auth().createUserWithEmailAndPassword(email, password);
await auth().createUserWithEmailAndPassword(email, password);
} else {
auth().signInWithEmailAndPassword(email, password);
await auth().signInWithEmailAndPassword(email, password);
}
} catch (err) {}
} catch (err) {
console.log(err)
// TODO: #107 -- Correct error handling
Alert.alert(err.message)
}
};
export const onAuthStateChanged = (

View File

@ -7,7 +7,6 @@ import { useAuth } from "../context";
// Sign out button only functional when NOT using dev env
export default function ProfileScreen() {
const { user } = useAuth();
console.log(user);
return (
<View style={styles.container}>