Commit c0e7a4cc authored by Ishini Kiridena's avatar Ishini Kiridena

Patient email, pw, un registration UI

parent 413e75ca
...@@ -5,6 +5,7 @@ import MainScreen from "./components/shared/mainview"; ...@@ -5,6 +5,7 @@ import MainScreen from "./components/shared/mainview";
import SplashScreenComponent from "./components/shared/splashscreen"; import SplashScreenComponent from "./components/shared/splashscreen";
import SharedLogin from "./components/shared/sharedLogin"; import SharedLogin from "./components/shared/sharedLogin";
import SharedRegisterScreen from "./components/shared/sharedRegistration"; import SharedRegisterScreen from "./components/shared/sharedRegistration";
import PatientRegOne from "./components/practitionerscreens/registration/regOne";
const Stack = createStackNavigator(); const Stack = createStackNavigator();
...@@ -36,6 +37,11 @@ export default function App() { ...@@ -36,6 +37,11 @@ export default function App() {
component={SharedRegisterScreen} component={SharedRegisterScreen}
options={{ headerShown: false }} options={{ headerShown: false }}
/> />
<Stack.Screen
name="PatientRegOne"
component={PatientRegOne}
options={{ headerShown: false }}
/>
</Stack.Navigator> </Stack.Navigator>
) : ( ) : (
<SplashScreenComponent /> <SplashScreenComponent />
......
import React, { useState } from "react";
import { View, TextInput, Button, StyleSheet } from "react-native";
import { useNavigation } from "@react-navigation/native";
export default function PatientRegOne() {
const navigation = useNavigation();
const [email, setEmail] = useState("");
const [username, setUsername] = useState("");
const [password, setPassword] = useState("");
const handleNext = () => {
// navigation.navigate("PatientRegTwo", {
// email,
// username,
// password,
// });
console.log(email, username, password);
};
return (
<View style={styles.container}>
<TextInput
style={styles.input}
placeholder="Email"
value={email}
onChangeText={(text) => setEmail(text)}
/>
<TextInput
style={styles.input}
placeholder="Username"
value={username}
onChangeText={(text) => setUsername(text)}
/>
<TextInput
style={styles.input}
placeholder="Password"
value={password}
onChangeText={(text) => setPassword(text)}
secureTextEntry={true}
/>
<Button title="Next" onPress={handleNext} />
</View>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
alignItems: "center",
justifyContent: "center",
},
input: {
width: "80%",
height: 40,
marginVertical: 10,
paddingHorizontal: 10,
borderColor: "gray",
borderWidth: 1,
borderRadius: 5,
},
});
import React from "react"; import React from "react";
import { StyleSheet, View, Text, Button } from "react-native"; import { StyleSheet, View, Text, Button } from "react-native";
const SharedLogin = () => { export default function SharedLogin({ navigation }) {
return ( return (
<View style={styles.container}> <View style={styles.container}>
<View style={styles.buttonContainer}> <View style={styles.buttonContainer}>
<Button title="Patient" onPress={() => console.log("Patient login")} /> <Button
title="I am here to get help"
onPress={() => console.log("Patient login")}
/>
<View style={styles.separator} /> <View style={styles.separator} />
<Button <Button
title="Practitioner" title="I am here to help"
onPress={() => console.log("Practitioner login")} onPress={() => console.log("Practitioner login")}
/> />
</View> </View>
</View> </View>
); );
}; }
const styles = StyleSheet.create({ const styles = StyleSheet.create({
container: { container: {
...@@ -30,4 +33,3 @@ const styles = StyleSheet.create({ ...@@ -30,4 +33,3 @@ const styles = StyleSheet.create({
width: 10, width: 10,
}, },
}); });
export default SharedLogin;
import React from "react"; import React from "react";
import { StyleSheet, View, Text, Button } from "react-native"; import { StyleSheet, View, Text, Button } from "react-native";
const SharedRegisterScreen = () => { export default function SharedRegisterScreen({ navigation }) {
return ( return (
<View style={styles.container}> <View style={styles.container}>
<View style={styles.buttonContainer}> <View style={styles.buttonContainer}>
<Button <Button
title="Patient Register" title="Patient Register"
onPress={() => console.log("Patient registration")} onPress={() => {
console.log("Patient registration");
navigation.navigate("PatientRegOne");
}}
/> />
<View style={styles.separator} /> <View style={styles.separator} />
<Button <Button
...@@ -17,7 +20,7 @@ const SharedRegisterScreen = () => { ...@@ -17,7 +20,7 @@ const SharedRegisterScreen = () => {
</View> </View>
</View> </View>
); );
}; }
const styles = StyleSheet.create({ const styles = StyleSheet.create({
container: { container: {
flex: 1, flex: 1,
...@@ -32,4 +35,3 @@ const styles = StyleSheet.create({ ...@@ -32,4 +35,3 @@ const styles = StyleSheet.create({
width: 10, width: 10,
}, },
}); });
export default SharedRegisterScreen;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment