import React, { useState } from 'react'; import { View, TextInput, Button, Text, StyleSheet, Alert } from 'react-native'; import emailService from '../../services/emailService'; const SignupScreen = ({ navigation }) => { const [email, setEmail] = useState(''); const [password, setPassword] = useState(''); const handleSignup = async () => { try { // Trigger OTP email using custom email service await emailService.sendOtp(email); Alert.alert('Success', 'OTP sent to your email'); navigation.navigate('Login'); // Navigate to Login after sending OTP } catch (error) { console.error('Signup error:', error); Alert.alert('Error', 'There was an error sending the OTP. Please try again.'); } }; return ( Sign Up