aboutsummaryrefslogblamecommitdiffstats
path: root/src/screens/Auth/ForgotPasswordScreen.js
blob: 0dd8c08dd5aa368554276c288b811a4ba9e7197e (plain) (tree)
1
2
3
4


                                                                                
                                                  


















                                                                                       


                                                                                     






















                                  


                    


                                    
 
import React, { useState } from 'react';
import { View, Text, TextInput, Button, StyleSheet, Alert } from 'react-native';

const ForgotPasswordScreen = ({ navigation }) => {
  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 style={styles.buttonContainer}>
        <Button title="Back to Login" onPress={() => navigation.navigate('Login')} />
      </View>
    </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,
  },
  buttonContainer: {
    marginTop: 12,
  },
});

export default ForgotPasswordScreen;