@@ -14,6 +14,8 @@ import eventEmitter from "./EventEmitter";
14
14
import { useTheme } from "../services/ThemeContext" ;
15
15
import getStyles from "../styles/DailyViewStyles" ;
16
16
import BirthdayCelebration from "./BDCelebration" ;
17
+ import Icon from 'react-native-vector-icons/FontAwesome' ;
18
+ import Icon2 from 'react-native-vector-icons/Fontisto' ;
17
19
18
20
const DailyView = ( {
19
21
userID,
@@ -136,23 +138,38 @@ const DailyView = ({
136
138
keyExtractor = { ( item ) => item . id . toString ( ) }
137
139
renderItem = { ( { item } ) => (
138
140
< View style = { styles . taskItem } >
139
- < Text style = { styles . taskItemText } >
140
- { item . name } { item . completed ? "✓" : "" }
141
+ < Text style = { styles . taskItemText } numberOfLines = { 1 } ellipsizeMode = 'tail' >
142
+ { item . completed ? < Icon name = "check-circle" size = { 20 } color = "green" /> : "" } { item . name }
141
143
</ Text >
142
144
< TouchableOpacity
143
145
style = { styles . moreButton }
144
146
onPress = { ( ) => setVisibleTaskActions ( prev => ( {
145
147
...prev ,
146
- [ item . id ] : ! prev [ item . id ] // Toggle visibility of action buttons
148
+ [ item . id ] : ! prev [ item . id ]
147
149
} ) ) }
148
150
>
149
- < Text > ☰ </ Text >
151
+ < Icon name = "bars" size = { 20 } color = "#000" / >
150
152
</ TouchableOpacity >
151
153
{ visibleTaskActions [ item . id ] && (
152
154
< View style = { styles . taskActions } >
153
- < Button title = "Completion" onPress = { ( ) => toggleCompletion ( item ) } />
154
- < Button title = "Edit" onPress = { ( ) => navigation . navigate ( "EditTaskScreen" , { task : item , userId : userID } ) } />
155
- < Button title = "Delete" onPress = { ( ) => onTaskDelete ( item . id ) } />
155
+ < TouchableOpacity
156
+ style = { [ styles . actionButton , styles . completeButton ] }
157
+ onPress = { ( ) => toggleCompletion ( item ) }
158
+ >
159
+ < Icon2 name = { item . completed ? "checkbox-active" : "checkbox-passive" } size = { 15 } color = { "white" } />
160
+ </ TouchableOpacity >
161
+ < TouchableOpacity
162
+ style = { [ styles . actionButton , styles . editButton ] }
163
+ onPress = { ( ) => navigation . navigate ( "EditTaskScreen" , { task : item , userId : userID } ) }
164
+ >
165
+ < Icon name = "pencil" size = { 15 } color = "white" />
166
+ </ TouchableOpacity >
167
+ < TouchableOpacity
168
+ style = { [ styles . actionButton , styles . deleteButton ] }
169
+ onPress = { ( ) => onTaskDelete ( item . id ) }
170
+ >
171
+ < Icon name = "trash" size = { 20 } color = "white" />
172
+ </ TouchableOpacity >
156
173
</ View >
157
174
) }
158
175
</ View >
@@ -162,4 +179,4 @@ const DailyView = ({
162
179
) ;
163
180
} ;
164
181
165
- export default DailyView ;
182
+ export default DailyView ;
0 commit comments