-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathApp.js
119 lines (116 loc) · 2.72 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
116
117
118
119
import React, { Component } from "react";
import { StackNavigator } from "react-navigation";
import { createAppContainer } from "react-navigation";
import { createStackNavigator } from "react-navigation-stack";
import {
StyleSheet,
Text,
View,
Image,
Button,
TouchableOpacity
} from "react-native";
import signUp from "./pages/signup";
import Profile from "./pages/welcome";
import Consultform from "./pages/consult/consultform";
import Reviewconsult from "./pages/consult/reviewconsult";
import PatientList, {
PatientData,
OpenConsult
} from "./pages/Patient Data/datalist";
import Recorder from "./pages/consult/recorder";
// import navigator from "./navigator.js";
class HomeScreen extends Component {
constructor(props) {
super(props);
this.state = {};
}
goSignup = () => {
this.props.navigation.navigate("Sign");
};
render() {
return (
<View style={styles.container}>
<Image
style={{ width: 400, height: 200 }}
source={{
uri:
"https://images.unsplash.com/photo-1532938911079-1b06ac7ceec7?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1189&q=80"
}}
/>
<Text style={styles.text}>Welcome To App </Text>
<TouchableOpacity style={styles.button}>
<Button
title="Let's Start"
onPress={this.goSignup}
color="#9FC131"
></Button>
</TouchableOpacity>
</View>
);
}
}
const AppNavigator = createStackNavigator(
{
Home: HomeScreen,
Sign: signUp,
Welcome: Profile,
Consultform: Consultform,
Reviewconsult: Reviewconsult,
Success: SuccessMessage,
PatientList: PatientList,
PatientData: PatientData,
OpenConsult: OpenConsult,
Recorder: Recorder
},
{
initialRouteName: "Home"
}
);
export default createAppContainer(AppNavigator);
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: "#fff",
alignItems: "center",
justifyContent: "center"
},
text: {
fontSize: 22,
fontFamily: "Roboto",
marginTop: 50,
marginBottom: 40
},
button: {
width: 200,
height: 50
},
popup: {
alignItems: "center",
position: "absolute",
paddingTop: 15,
top: 180,
zIndex: 10,
left: 30,
height: 200,
width: 330,
borderRadius: 20,
shadowRadius: 60,
shadowColor: "#d1d1d1",
backgroundColor: "#fff"
}
});
export function SuccessMessage(props) {
return (
<View style={styles.popup}>
<Text>Your Consultation Has been Sent To Patient !</Text>
<Button
color="#9FC131"
onPress={() => {
props.navigation.navigate("Welcome");
}}
title="Close"
/>
</View>
);
}