import React from 'react'; import { View, Text, StyleSheet, ScrollView, TouchableOpacity, Image, Linking, } from 'react-native'; import { LinearGradient } from 'expo-linear-gradient'; import { Ionicons } from '@expo/vector-icons'; import { useAuth } from '../../context/AuthContext'; import { Card } from '../../components/ui/Card'; import { Button } from '../../components/ui/Button'; import { colors, spacing, typography, borderRadius } from '../../theme'; export function ProfileScreen() { const { user, signOut } = useAuth(); const handleSignOut = async () => { try { await signOut(); } catch (error) { console.error('Sign out error:', error); } }; const menuItems: { iconName: keyof typeof Ionicons.glyphMap; label: string; onPress: () => void; value?: string }[] = [ { iconName: 'notifications-outline', label: 'Notifications', onPress: () => {} }, { iconName: 'moon-outline', label: 'Dark Mode', onPress: () => {}, value: 'On' }, { iconName: 'location-outline', label: 'Location Settings', onPress: () => Linking.openSettings() }, { iconName: 'help-circle-outline', label: 'Help & Support', onPress: () => {} }, { iconName: 'document-text-outline', label: 'Terms of Service', onPress: () => {} }, { iconName: 'lock-closed-outline', label: 'Privacy Policy', onPress: () => {} }, ]; return ( {user?.user_metadata?.avatar_url ? ( ) : ( )} {user?.user_metadata?.full_name || 'Citizen'} {user?.email} 12 Reports 8 Resolved 95% Accuracy Civic Champion Top 10% contributor in your area Settings {menuItems.map((item, index) => ( {item.label} {item.value ? ( {item.value} ) : null} ))}