import React, { useState } from 'react';
import {
View,
ScrollView,
Text,
StyleSheet,
SafeAreaView,
TouchableOpacity,
Alert,
} from 'react-native';
import { Ionicons } from '@expo/vector-icons';
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#f5f5f5',
},
profileHeader: {
backgroundColor: '#fff',
paddingVertical: 24,
paddingHorizontal: 16,
alignItems: 'center',
borderBottomWidth: 1,
borderBottomColor: '#e0e0e0',
},
avatar: {
width: 80,
height: 80,
borderRadius: 40,
backgroundColor: '#0066cc',
justifyContent: 'center',
alignItems: 'center',
marginBottom: 12,
},
avatarText: {
color: '#fff',
fontSize: 32,
fontWeight: '700',
},
profileName: {
fontSize: 20,
fontWeight: '700',
color: '#000',
marginBottom: 4,
},
profileStatus: {
fontSize: 14,
color: '#666',
},
section: {
paddingHorizontal: 16,
marginTop: 16,
},
sectionTitle: {
fontSize: 14,
fontWeight: '600',
color: '#999',
textTransform: 'uppercase',
marginBottom: 8,
},
menuItem: {
backgroundColor: '#fff',
paddingVertical: 14,
paddingHorizontal: 16,
borderBottomWidth: 1,
borderBottomColor: '#f0f0f0',
flexDirection: 'row',
justifyContent: 'space-between',
alignItems: 'center',
},
menuItemFirst: {
borderTopLeftRadius: 12,
borderTopRightRadius: 12,
},
menuItemLast: {
borderBottomLeftRadius: 12,
borderBottomRightRadius: 12,
borderBottomWidth: 0,
},
menuIcon: {
width: 24,
height: 24,
justifyContent: 'center',
alignItems: 'center',
marginRight: 12,
},
menuLabel: {
fontSize: 15,
color: '#000',
flex: 1,
fontWeight: '500',
},
menuArrow: {
color: '#999',
},
signOutButton: {
backgroundColor: '#fff',
paddingVertical: 12,
paddingHorizontal: 16,
marginTop: 8,
borderRadius: 12,
alignItems: 'center',
borderWidth: 1,
borderColor: '#ff4444',
},
signOutText: {
color: '#ff4444',
fontSize: 15,
fontWeight: '600',
},
});
export default function ProfileScreen() {
const [isLoggedIn, setIsLoggedIn] = useState(false);
const handleSignOut = () => {
Alert.alert('Sign Out', 'Are you sure you want to sign out?', [
{ text: 'Cancel', onPress: () => {} },
{
text: 'Sign Out',
onPress: () => {
setIsLoggedIn(false);
},
},
]);
};
if (!isLoggedIn) {
return (
Welcome
Sign in to access your profile
setIsLoggedIn(true)}
>
Sign In
About
About Us
Privacy Policy
Terms of Service
);
}
return (
👤
John Doe
Active Member
Account
Edit Profile
Notifications
Change Password
Preferences
Dark Mode
Language
Help
Help & Support
Contact Us
Sign Out
);
}