diff options
author | Biswakalyan Bhuyan <biswa@surgot.in> | 2024-10-16 18:30:25 +0530 |
---|---|---|
committer | Biswakalyan Bhuyan <biswa@surgot.in> | 2024-10-16 18:30:25 +0530 |
commit | fd6e2805940bc6716d08e2190e66239914839f1a (patch) | |
tree | 6a49fbeedc9cf35b0f74302f2e59f2f680fee22b | |
parent | 524be906393c2522702f4f8badc3527aad37c290 (diff) | |
download | mall-app-fd6e2805940bc6716d08e2190e66239914839f1a.tar.gz mall-app-fd6e2805940bc6716d08e2190e66239914839f1a.tar.bz2 mall-app-fd6e2805940bc6716d08e2190e66239914839f1a.zip |
Added forget password option and Signup option at login page
-rw-r--r-- | src/screens/Auth/ForgotPasswordScreen.js | 49 | ||||
-rw-r--r-- | src/screens/Auth/LoginScreen.js | 1 |
2 files changed, 50 insertions, 0 deletions
diff --git a/src/screens/Auth/ForgotPasswordScreen.js b/src/screens/Auth/ForgotPasswordScreen.js new file mode 100644 index 0000000..a768f20 --- /dev/null +++ b/src/screens/Auth/ForgotPasswordScreen.js @@ -0,0 +1,49 @@ +import React, { useState } from 'react'; +import { View, Text, TextInput, Button, StyleSheet, Alert } from 'react-native'; + +const ForgotPasswordScreen = () => { + const [email, setEmail] = useState(''); + + const handleForgotPassword = () => { + // Handle forgot password logic here (e.g., send reset link) + Alert.alert("Reset Password", "Check your email for password reset instructions."); + }; + + return ( + <View style={styles.container}> + <Text style={styles.title}>Forgot Password</Text> + <TextInput + style={styles.input} + placeholder="Email" + value={email} + onChangeText={setEmail} + keyboardType="email-address" + autoCapitalize="none" + /> + <Button title="Reset Password" onPress={handleForgotPassword} /> + </View> + ); +}; + +const styles = StyleSheet.create({ + container: { + flex: 1, + justifyContent: 'center', + padding: 16, + }, + title: { + fontSize: 24, + fontWeight: 'bold', + marginBottom: 24, + textAlign: 'center', + }, + input: { + height: 40, + borderColor: '#ccc', + borderWidth: 1, + marginBottom: 12, + paddingHorizontal: 8, + }, +}); + +export default ForgotPasswordScreen; diff --git a/src/screens/Auth/LoginScreen.js b/src/screens/Auth/LoginScreen.js index f7ef695..6ced78d 100644 --- a/src/screens/Auth/LoginScreen.js +++ b/src/screens/Auth/LoginScreen.js @@ -16,6 +16,7 @@ const LoginScreen = ({ navigation }) => { }; const handleForgotPassword = () => { + console.log("Navigating to Forgot Password"); // Navigate to the forgot password screen navigation.navigate('ForgotPassword'); }; |