File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ export default function LoginScreen({ navigation }) {
3838 picture : userInfo . data . user . photo ,
3939 } ;
4040 await login ( user ) ;
41- navigation . goBack ( ) ;
41+ navigation . replace ( 'Home' ) ;
4242 } catch ( error ) {
4343 if ( error . code === statusCodes . SIGN_IN_CANCELLED ) return ;
4444 if ( error . code === statusCodes . IN_PROGRESS ) return ;
@@ -54,14 +54,14 @@ export default function LoginScreen({ navigation }) {
5454 if ( form . password . length < 6 ) { Alert . alert ( 'Error' , 'Password must be at least 6 characters' ) ; return ; }
5555 const user = { name : form . name , email : form . email , picture : null } ;
5656 await login ( user ) ;
57- navigation . goBack ( ) ;
57+ navigation . replace ( 'Home' ) ;
5858 } else {
5959 const saved = await AsyncStorage . getItem ( 'zappify_user' ) ;
6060 if ( saved ) {
6161 const u = JSON . parse ( saved ) ;
6262 if ( u . email === form . email ) {
6363 await login ( u ) ;
64- navigation . goBack ( ) ;
64+ navigation . replace ( 'Home' ) ;
6565 } else {
6666 Alert . alert ( 'Error' , 'Account not found. Please sign up first.' ) ;
6767 }
You can’t perform that action at this time.
0 commit comments