1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
import { Link } from 'expo-router';
import { Pressable, StyleSheet, Text, View } from 'react-native';
import { useAuthSession } from '@/providers/AuthProvider';
export default function HomeScreen() {
const { user } = useAuthSession();
return (
<View style={styles.container}>
<Text style={styles.title}>Inicio</Text>
<Text style={styles.subtitle}>
Bienvenido{user?.displayName ? `, ${user.displayName}` : ''}
</Text>
<Text style={styles.email}>{user?.email}</Text>
<View style={styles.actions}>
<Link href="/(protected)/(tabs)/offices" asChild>
<Pressable style={styles.button}>
<Text style={styles.buttonText}>Ver espacios</Text>
</Pressable>
</Link>
<Link href="/(protected)/(tabs)/reservations" asChild>
<Pressable style={styles.button}>
<Text style={styles.buttonText}>Mis reservas</Text>
</Pressable>
</Link>
<Link href="/(protected)/(tabs)/profile" asChild>
<Pressable style={styles.secondaryButton}>
<Text style={styles.buttonText}>Ir a perfil</Text>
</Pressable>
</Link>
</View>
</View>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
padding: 16,
justifyContent: 'center',
gap: 12,
},
title: {
fontSize: 30,
fontWeight: '700',
},
subtitle: {
fontSize: 18,
},
email: {
color: '#666',
marginBottom: 20,
},
actions: {
gap: 12,
},
button: {
backgroundColor: '#1f6feb',
paddingVertical: 14,
borderRadius: 10,
alignItems: 'center',
},
secondaryButton: {
backgroundColor: '#555',
paddingVertical: 14,
borderRadius: 10,
alignItems: 'center',
},
buttonText: {
color: '#fff',
fontWeight: '600',
},
});
|