55 TouchableOpacity ,
66 StyleSheet ,
77 Dimensions ,
8- Image ,
98 ScrollView ,
109 StatusBar ,
1110 Animated ,
@@ -14,6 +13,7 @@ import {
1413import { Ionicons } from "@expo/vector-icons" ;
1514import { useNavigation , NavigationProp } from "@react-navigation/native" ;
1615import { useTranslation } from "react-i18next" ;
16+ import { LinearGradient } from "expo-linear-gradient" ;
1717import * as authService from "../../services/authService" ;
1818import { NotificationSnackbar } from "../../components/UI/NotificationSnackbar" ;
1919import AsyncStorage from "@react-native-async-storage/async-storage" ;
@@ -183,11 +183,17 @@ const ProfileScreen = () => {
183183 < ScrollView contentContainerStyle = { styles . scrollContainer } >
184184 < Animated . View style = { [ styles . content , { opacity : fadeAnim } ] } >
185185 < View style = { styles . headerSection } >
186- < View style = { styles . avatar } >
187- < Image
188- source = { require ( "../../../assets/circle-user.png" ) }
189- style = { styles . avatarImage }
190- />
186+ < View style = { styles . avatarContainer } >
187+ < LinearGradient
188+ colors = { [ '#1a1a1a' , '#4a4a4a' , '#2d2d2d' ] }
189+ start = { { x : 0 , y : 0 } }
190+ end = { { x : 1 , y : 1 } }
191+ style = { styles . gradientAvatar }
192+ >
193+ < Text style = { styles . initialsText } >
194+ { userData . username ? userData . username . substring ( 0 , 2 ) . toUpperCase ( ) : 'U' }
195+ </ Text >
196+ </ LinearGradient >
191197 </ View >
192198 < Text style = { styles . username } > { userData . username } </ Text >
193199 < Text style = { styles . userSubtitle } > { t ( 'profile.user.subtitle' ) } </ Text >
@@ -377,21 +383,25 @@ const styles = StyleSheet.create({
377383 marginTop : 20 ,
378384 paddingHorizontal : 20 ,
379385 } ,
380- avatar : {
386+ avatarContainer : {
381387 width : 120 ,
382388 height : 120 ,
383389 borderRadius : 60 ,
384- backgroundColor : "#ffffff" ,
385390 marginBottom : 20 ,
386- justifyContent : "center" ,
387- alignItems : "center" ,
388- borderWidth : 4 ,
389- borderColor : "#000000" ,
391+ overflow : 'hidden' ,
390392 } ,
391- avatarImage : {
392- width : "85%" ,
393- height : "85%" ,
394- borderRadius : 50 ,
393+ gradientAvatar : {
394+ width : '100%' ,
395+ height : '100%' ,
396+ justifyContent : 'center' ,
397+ alignItems : 'center' ,
398+ } ,
399+ initialsText : {
400+ fontSize : 48 ,
401+ fontWeight : '700' ,
402+ color : '#ffffff' ,
403+ fontFamily : 'System' ,
404+ letterSpacing : 2 ,
395405 } ,
396406 username : {
397407 fontSize : 28 ,
0 commit comments