-
Notifications
You must be signed in to change notification settings - Fork 3
/
App.js
executable file
·115 lines (100 loc) · 2.97 KB
/
App.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
// import EnterName from './App/Components/EnterName
import React from 'react';
import {AppRegistry,
View,
Text,
TextInput,
StyleSheet,
Button,
Linking,
TouchableOpacity,
} from 'react-native';
import { requireNativeViewManager } from 'expo-core';
// components import
// import FbLogin from './components/myComponents/FbLogin';
// import GoogleLogin from './components/myComponents/GoogleLogin';
// import LoginInputs from './components/myComponents/LoginInputs';
import LoginPage from './components/myComponents/LoginPage';
import SignupPage from './components/myComponents/SignupPage';
import ForgotPassword from './components/myComponents/ForgotPassword';
// import KeyboardAvoidingViewDemo from './components/myComponents/KeyboardAvoidingViewDemo';
// import SignupInputs from './components/myComponents/SignupInputs';
// import FbSignUp from './components/myComponents/FbSignUp';
// import GoogleSignUp from './components/myComponents/GoogleSignUp';
export default class App extends React.Component {
constructor(props) {
super(props);
this.state={
isLoggedIn:false,
isSingup:false,
isforgotPass:false,
showLoginPage:false,
showSignupPage:false,
showForgotPassPage:false,
}
this.changeToAlreadyregistered = this.changeToAlreadyregistered.bind(this);
this.changeToCreateAccount = this.changeToCreateAccount.bind(this);
this.changeToForgotPass = this.changeToForgotPass.bind(this);
this.onPressLearnMore=this.onPressLearnMore.bind(this);
}
componentWillMount() {
// on begining showing signup page
this.setState({showSignupPage:true});
}
onPressLearnMore() {
}
changeToAlreadyregistered() {
this.setState({
showLoginPage:true,
showSignupPage:false,
showForgotPassPage:false,
})
}
changeToCreateAccount() {
this.setState({
showSignupPage:true,
showLoginPage:false,
showForgotPassPage:false,
})
}
changeToForgotPass() {
this.setState({
showForgotPassPage:true,
showSignupPage:false,
showLoginPage:false,
})
}
render() {
return (
<View>
{this.state.showSignupPage===true?<SignupPage onPressAlreadyReg = {this.changeToAlreadyregistered} />:<Text></Text>}
{this.state.showLoginPage===true?<LoginPage onPressCreateAcc = {this.changeToCreateAccount} onPressForgotPass={this.changeToForgotPass}/>:<Text></Text>}
{this.state.showForgotPassPage===true?<ForgotPassword />:<Text></Text>}
</View>
);
}
}
const style = StyleSheet.create( {
// title:{
// color:'red',
// textAlign:'center',
// marginTop:50,
// fontSize:30,
// fontWeight:'bold'
// },
// center: {
// marginLeft:'auto',
// marginRight:'auto',
// },
// textButton: {
// width:140,
// padding:10,
// fontSize:20,
// marginLeft:10,
// fontWeight:'bold',
// borderRadius:30,
// color:'white',
// textAlign:'center',
// backgroundColor: 'green',
// },
})