summaryrefslogtreecommitdiffstats
path: root/src/app/(auth)
diff options
context:
space:
mode:
authorAlberto Duarte Delgado <alberto@albertoduarte.com>2026-04-01 13:03:25 +0100
committerAlberto Duarte Delgado <alberto@albertoduarte.com>2026-04-01 13:03:25 +0100
commit08ce78dbd97ad792e163482f454f285557c7cdd0 (patch)
tree998ce8d7d48f8344d9ec34691809f2482cde5136 /src/app/(auth)
parentc927739f8f221feabb6e19af2c2667eda905a2eb (diff)
Mejoras de UX y feedback de errores; y, manejo de status de reserva
Diffstat (limited to 'src/app/(auth)')
-rw-r--r--src/app/(auth)/login.tsx6
-rw-r--r--src/app/(auth)/register.tsx6
2 files changed, 4 insertions, 8 deletions
diff --git a/src/app/(auth)/login.tsx b/src/app/(auth)/login.tsx
index 5664bbf..7457b54 100644
--- a/src/app/(auth)/login.tsx
+++ b/src/app/(auth)/login.tsx
@@ -1,6 +1,7 @@
import { Link } from 'expo-router';
import { Pressable, StyleSheet, Text, TextInput, View } from 'react-native';
import { useLogin } from '@/features/auth/hooks/useLogin';
+import { StatusMessage } from '@/shared/ui/StatusMessage';
export default function LoginScreen() {
const { email, password, setEmail, setPassword, submit, isSubmitting, error } = useLogin();
@@ -26,7 +27,7 @@ export default function LoginScreen() {
onChangeText={setPassword}
/>
- {error ? <Text style={styles.error}>{error}</Text> : null}
+ {error ? <StatusMessage message={error} /> : null}
<Pressable style={styles.button} onPress={submit} disabled={isSubmitting}>
<Text style={styles.buttonText}>
@@ -71,9 +72,6 @@ const styles = StyleSheet.create({
color: '#fff',
fontWeight: '600',
},
- error: {
- color: 'red',
- },
link: {
marginTop: 12,
},
diff --git a/src/app/(auth)/register.tsx b/src/app/(auth)/register.tsx
index 1a39a78..0eeb058 100644
--- a/src/app/(auth)/register.tsx
+++ b/src/app/(auth)/register.tsx
@@ -1,6 +1,7 @@
import { Link } from 'expo-router';
import { Pressable, StyleSheet, Text, TextInput, View } from 'react-native';
import { useRegister } from '@/features/auth/hooks/useRegister';
+import { StatusMessage } from '@/shared/ui/StatusMessage';
export default function RegisterScreen() {
const {
@@ -43,7 +44,7 @@ export default function RegisterScreen() {
onChangeText={setPassword}
/>
- {error ? <Text style={styles.error}>{error}</Text> : null}
+ {error ? <StatusMessage message={error} /> : null}
<Pressable style={styles.button} onPress={submit} disabled={isSubmitting}>
<Text style={styles.buttonText}>
@@ -88,9 +89,6 @@ const styles = StyleSheet.create({
color: '#fff',
fontWeight: '600',
},
- error: {
- color: 'red',
- },
link: {
marginTop: 12,
},