Closed Kechr closed 2 years ago
What is Make info component
?
also I am not sure what todo at line 129
is, maybe it has changed?
Yes, it is at line 177 now.
Right now the info section of the profile page is like this:
<View style={profileStyle.row}>
<Ionicons name={"call"} size={30} color={colors.darkGray} />
<Text style={profileStyle.infoText}> {phone} </Text>
</View>
<View style={profileStyle.row}>
<Ionicons name={"at"} size={30} color={colors.darkGray} />
<Text style={profileStyle.infoText}>{email} </Text>
</View>
<View style={profileStyle.row}>
<Ionicons name={"pin"} size={30} color={colors.darkGray} />
<Text style={profileStyle.infoText}>{location} </Text>
</View>
Which contains a lot of duplicated lines. To make it easier to maintain, and understand, the view
should be made into a component (or just a function) where iconName
and Text
are passed as props
.
Fix todo at line 129.