-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProfileScreen.js
More file actions
90 lines (77 loc) · 2.66 KB
/
ProfileScreen.js
File metadata and controls
90 lines (77 loc) · 2.66 KB
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
// ProfileScreen.js
import React from 'react';
import { View, Text, TouchableOpacity, StyleSheet } from 'react-native';
import { AntDesign, Entypo, MaterialIcons } from '@expo/vector-icons';
const ProfileScreen = ({ navigation }) => {
const handleEditProfile = () => {
// Navegar para a tela de edição de perfil
navigation.navigate('EditProfile');
};
const handleChangePassword = () => {
// Navegar para a tela de solicitação de alteração de senha
navigation.navigate('ChangePasswordRequestScreen');
};
const handleSettings = () => {
navigation.navigate('Configurations');
};
const handleAbout = () => {
navigation.navigate('AboutUsScreen');
};
const handleLogout = () => {
alert('Realizar logout');
navigation.navigate('Login');
};
return (
<View style={styles.container}>
<Text style={styles.title}>Perfil do Usuário</Text>
<TouchableOpacity style={styles.profileOption} onPress={handleEditProfile}>
<AntDesign name="edit" size={24} color="#3498db" />
<Text style={styles.profileOptionText}>Editar Perfil</Text>
</TouchableOpacity>
<TouchableOpacity style={styles.profileOption} onPress={handleChangePassword}>
<AntDesign name="lock" size={24} color="#3498db" />
<Text style={styles.profileOptionText}>Alterar Senha</Text>
</TouchableOpacity>
<TouchableOpacity style={styles.profileOption} onPress={handleSettings}>
<Entypo name="cog" size={24} color="#3498db" />
<Text style={styles.profileOptionText}>Configurações</Text>
</TouchableOpacity>
<TouchableOpacity style={styles.profileOption} onPress={handleAbout}>
<AntDesign name="infocirlceo" size={24} color="#3498db" />
<Text style={styles.profileOptionText}>Sobre</Text>
</TouchableOpacity>
<TouchableOpacity style={styles.profileOption} onPress={handleLogout}>
<AntDesign name="logout" size={24} color="#e74c3c" />
<Text style={[styles.profileOptionText, { color: '#e74c3c' }]}>Logout</Text>
</TouchableOpacity>
</View>
);
};
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
padding: 20,
},
title: {
fontSize: 24,
fontWeight: 'bold',
textAlign: 'center',
color: '#3498db',
marginBottom: 20,
},
profileOption: {
flexDirection: 'row',
alignItems: 'center',
marginBottom: 15,
backgroundColor: '#ecf0f1',
padding: 10,
borderRadius: 8,
},
profileOptionText: {
marginLeft: 10,
fontSize: 16,
color: '#333',
},
});
export default ProfileScreen;