@@ -4,6 +4,7 @@ import { View, StyleSheet, Text, Image, TouchableOpacity, ActivityIndicator } fr
4
4
import { MaterialCommunityIcons } from '@expo/vector-icons' ;
5
5
6
6
import { utils } from '@monkvision/toolkit' ;
7
+ import texts from './texts' ;
7
8
8
9
const { spacing } = utils . styles ;
9
10
@@ -59,6 +60,13 @@ const styles = StyleSheet.create({
59
60
alignSelf : 'center' ,
60
61
zIndex : 10 ,
61
62
} ,
63
+ retakeText : {
64
+ color : '#fff' ,
65
+ fontSize : 12 ,
66
+ fontWeight : 'bold' ,
67
+ textTransform : 'uppercase' ,
68
+ textAlign : 'center' ,
69
+ } ,
62
70
} ) ;
63
71
64
72
function UploadCard ( { compliance, id, label, onRetake, picture, upload } ) {
@@ -92,19 +100,19 @@ function UploadCard({ compliance, id, label, onRetake, picture, upload }) {
92
100
if ( badQuality && iqa . reasons ) {
93
101
iqa . reasons . forEach ( ( reason , index ) => {
94
102
const first = index === 0 ;
95
- reasons . push ( first ? reason : `and ${ reason } ` ) ;
103
+ reasons . push ( first ? texts [ reason ] : `and ${ texts [ reason ] } ` ) ;
96
104
} ) ;
97
105
}
98
106
99
107
if ( badCoverage && carCov . reasons ) {
100
108
carCov . reasons . forEach ( ( reason , index ) => {
101
109
const first = index === 0 && ! badQuality ;
102
- reasons . push ( first ? reason : `and ${ reason } ` ) ;
110
+ reasons . push ( first ? texts [ reason ] : `and ${ texts [ reason ] } ` ) ;
103
111
} ) ;
104
112
}
105
113
106
114
if ( reasons . length > 0 ) {
107
- return `This image has ${ reasons . join ( ' ' ) } ` ;
115
+ return `This image ${ reasons . join ( ' ' ) } ` ;
108
116
}
109
117
}
110
118
@@ -134,6 +142,7 @@ function UploadCard({ compliance, id, label, onRetake, picture, upload }) {
134
142
] }
135
143
>
136
144
< MaterialCommunityIcons name = "camera-retake" size = { 24 } color = "#FFF" />
145
+ < Text style = { styles . retakeText } > Retake picture</ Text >
137
146
</ View >
138
147
< Image style = { styles . image } source = { { uri } } />
139
148
</ TouchableOpacity >
0 commit comments