From 6aede83b39f1050b7528b243278a85e5623856be Mon Sep 17 00:00:00 2001 From: Alberto Duarte Delgado Date: Mon, 30 Mar 2026 14:59:30 +0100 Subject: Integracion Firebase --- src/app/(auth)/register.tsx | 97 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 97 insertions(+) (limited to 'src/app/(auth)/register.tsx') diff --git a/src/app/(auth)/register.tsx b/src/app/(auth)/register.tsx index e69de29..1a39a78 100644 --- a/src/app/(auth)/register.tsx +++ b/src/app/(auth)/register.tsx @@ -0,0 +1,97 @@ +import { Link } from 'expo-router'; +import { Pressable, StyleSheet, Text, TextInput, View } from 'react-native'; +import { useRegister } from '@/features/auth/hooks/useRegister'; + +export default function RegisterScreen() { + const { + displayName, + email, + password, + setDisplayName, + setEmail, + setPassword, + submit, + isSubmitting, + error, + } = useRegister(); + + return ( + + Registrarse + + + + + + + + {error ? {error} : null} + + + + {isSubmitting ? 'Registrando...' : 'Crear cuenta'} + + + + + ¿Ya tienes cuenta? Inicia sesión + + + ); +} + +const styles = StyleSheet.create({ + container: { + flex: 1, + justifyContent: 'center', + padding: 24, + gap: 12, + }, + title: { + fontSize: 28, + fontWeight: '700', + marginBottom: 16, + }, + input: { + borderWidth: 1, + borderColor: '#ccc', + borderRadius: 10, + paddingHorizontal: 14, + paddingVertical: 12, + }, + button: { + backgroundColor: '#1f6feb', + paddingVertical: 14, + borderRadius: 10, + alignItems: 'center', + marginTop: 8, + }, + buttonText: { + color: '#fff', + fontWeight: '600', + }, + error: { + color: 'red', + }, + link: { + marginTop: 12, + }, +}); -- cgit v1.2.3-54-g00ecf