Fixing bleeding and temperature button label on cycle day overview

This commit is contained in:
emelko
2018-07-23 18:15:57 +02:00
parent fb56fe4c2e
commit bcc901c061
+4 -4
View File
@@ -47,8 +47,8 @@ export default class DayView extends Component {
let bleedingLabel let bleedingLabel
if (this.cycleDay.bleeding) { if (this.cycleDay.bleeding) {
const bleeding = this.cycleDay.bleeding const bleeding = this.cycleDay.bleeding
if (typeof bleeding === 'number') { if (typeof bleeding.value === 'number') {
bleedingLabel = `${bleedingLabels[bleeding]}` bleedingLabel = `${bleedingLabels[bleeding.value]}`
if (bleeding.exclude) bleedingLabel = "( " + bleedingLabel + " )" if (bleeding.exclude) bleedingLabel = "( " + bleedingLabel + " )"
} }
} else { } else {
@@ -58,8 +58,8 @@ export default class DayView extends Component {
let temperatureLabel let temperatureLabel
if (this.cycleDay.temperature) { if (this.cycleDay.temperature) {
const temperature = this.cycleDay.temperature const temperature = this.cycleDay.temperature
if (typeof temperature === 'number') { if (typeof temperature.value === 'number') {
temperatureLabel = `${temperature} °C - ${temperature.time}` temperatureLabel = `${temperature.value} °C - ${temperature.time}`
if (temperature.exclude) { if (temperature.exclude) {
temperatureLabel = "( " + temperatureLabel + " )" temperatureLabel = "( " + temperatureLabel + " )"
} }