Skip to content

Commit dffdcf3

Browse files
added readme
1 parent 015e96d commit dffdcf3

File tree

3 files changed

+18
-1
lines changed

3 files changed

+18
-1
lines changed

README.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
## Aviate Coders App
2+
3+
---
4+
5+
Aviate coders is a platform where I write blogs and I thougt of making an android app for the same using React Native

screens/LoginScreen.tsx

+8-1
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,16 @@ const LoginScreen = ({ navigation }: AuthNavProps<"LoginScreen">) => {
5252

5353
const login = async (email: string, password: string) => {
5454
try {
55-
await auth().signInWithEmailAndPassword(email, password);
55+
setLoading(true);
56+
await auth()
57+
.signInWithEmailAndPassword(email, password)
58+
.then(() => {
59+
setLoading(false);
60+
});
5661
} catch (e) {
5762
console.log(e);
63+
setLoading(false);
64+
5865
Popup.show({
5966
type: "warning",
6067
title: "Email or password is wrong or you haven't signed in",

screens/SignupScreen.tsx

+5
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ const SignupScreen = ({ navigation }: AuthNavProps<"SignupScreen">) => {
6868

6969
const register = async (email: string, password: string) => {
7070
try {
71+
setLoading(true);
7172
await auth()
7273
.createUserWithEmailAndPassword(email, password)
7374
.then(() => {
@@ -81,7 +82,11 @@ const SignupScreen = ({ navigation }: AuthNavProps<"SignupScreen">) => {
8182
userImg: null,
8283
bookmarks: [],
8384
})
85+
.then(() => {
86+
setLoading(false);
87+
})
8488
.catch((error) => {
89+
setLoading(false);
8590
Popup.show({
8691
type: "warning",
8792
title: "Error creating account",

0 commit comments

Comments
 (0)