Skip to content
Snippets Groups Projects
Commit a5265cb9 authored by Julia Friesel's avatar Julia Friesel
Browse files

Add label in front of bleeding value

parent a8c981ee
No related branches found
No related tags found
No related merge requests found
......@@ -20,10 +20,17 @@ export default class DayView extends Component {
const navigate = this.props.navigation.navigate
const day = this.state.cycleDay
const bleedingValue = day.bleeding && day.bleeding.value
let bleedingLabel
if (typeof bleedingValue === 'number') {
bleedingLabel = `Bleeding: ${labels[bleedingValue]}`
} else {
bleedingLabel = ''
}
return (
<View style={styles.container}>
<Text style={styles.welcome}>{formatDateForViewHeader(day.date)}</Text>
<Text style={styles.welcome}>{typeof bleedingValue === 'number' ? labels[bleedingValue] : ''}</Text>
<Text style={styles.welcome}>{bleedingLabel}</Text>
<Button
onPress={() => navigate('bleeding', { cycleDay: day })}
title="Edit bleeding">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment