@@ -6,25 +6,26 @@ import {
66 Text ,
77 TextInput ,
88 View ,
9+ Image ,
910} from 'react-native' ;
1011import { SafeAreaView } from 'react-native-safe-area-context' ;
1112import { useRouter } from 'expo-router' ;
1213
1314import { Recipient } from '@/models/Recipient' ;
1415
1516const AllRecipientsScreen = ( ) => {
16- const router = useRouter ( ) ;
17-
17+ const router = useRouter ( ) ;
18+
1819 const recipients : Recipient [ ] = [
19- { id : '1' , name : 'Alex' , budget : 2000 , spent : 1500 } ,
20- { id : '2' , name : 'Emily' , budget : 2200 , spent : 1600 } ,
21- { id : '3' , name : 'Michael' , budget : 3000 , spent : 1500 } ,
22- { id : '4' , name : 'Malow' , budget : 1800 , spent : 1200 } ,
20+ { id : '1' , image : 'https://img.freepik.com/premium-vector/cute-boy-smiling-cartoon-kawaii-boy-illustration-boy-avatar-happy-kid_1001605-3445.jpg' , name : 'Alex' , budget : 2000 , spent : 1500 } ,
21+ { id : '2' , image : 'https://static.vecteezy.com/system/resources/previews/004/899/833/non_2x/beautiful-girl-with-blue-hair-avatar-of-woman-for-social-network-vector.jpg' , name : 'Emily' , budget : 2200 , spent : 1600 } ,
22+ { id : '3' , image : 'https://img.freepik.com/premium-vector/boy-with-blue-hoodie-blue-hoodie-with-hoodie-it_1230457-42660.jpg' , name : 'Michael' , budget : 3000 , spent : 1500 } ,
23+ { id : '4' , image : 'https://img.freepik.com/premium-vector/boy-with-hoodie-that-says-hes-boy_1230457-43316.jpg' , name : 'Malow' , budget : 1800 , spent : 1200 } ,
2324 ] ;
2425
2526 const handleAddRecipient = ( ) => {
2627 router . push ( '/recipients/add-recipient' ) ;
27- }
28+ } ;
2829
2930 return (
3031 < SafeAreaView style = { styles . container } >
@@ -52,9 +53,15 @@ const AllRecipientsScreen = () => {
5253 < ScrollView style = { styles . scrollView } >
5354 { recipients . map ( ( recipient ) => (
5455 < Pressable key = { recipient . id } style = { styles . recipientCard } >
55- < Text style = { styles . recipientName } > { recipient . name } </ Text >
56- < Text style = { styles . budgetText } > Budget: ${ recipient . budget } </ Text >
57- < Text style = { styles . spentText } > Spent: ${ recipient . spent } </ Text >
56+ < Image
57+ source = { { uri : recipient . image } }
58+ style = { styles . recipientImage }
59+ />
60+ < View style = { styles . recipientContent } >
61+ < Text style = { styles . recipientName } > { recipient . name } </ Text >
62+ < Text style = { styles . budgetText } > Budget: ${ recipient . budget } </ Text >
63+ < Text style = { styles . spentText } > Spent: ${ recipient . spent } </ Text >
64+ </ View >
5865 </ Pressable >
5966 ) ) }
6067 </ ScrollView >
@@ -121,12 +128,22 @@ const styles = StyleSheet.create({
121128 shadowOpacity : 0.1 ,
122129 shadowRadius : 4 ,
123130 elevation : 2 ,
131+ flexDirection : 'row' ,
132+ alignItems : 'center' ,
133+ } ,
134+ recipientImage : {
135+ width : 60 ,
136+ height : 60 ,
137+ borderRadius : 8 ,
138+ } ,
139+ recipientContent : {
140+ marginLeft : 12 ,
141+ flex : 1 ,
124142 } ,
125143 recipientName : {
126144 fontSize : 18 ,
127145 fontWeight : '600' ,
128146 color : '#333333' ,
129- marginBottom : 8 ,
130147 } ,
131148 budgetText : {
132149 fontSize : 14 ,
0 commit comments