From 86e0d967be5b3372e59cf54d021cd205d951239c Mon Sep 17 00:00:00 2001 From: Julia Friesel Date: Thu, 17 Jan 2019 21:02:32 +0100 Subject: [PATCH] Pass correct props to bleeding edit view from home screen --- components/home.js | 39 ++++++++++++++++----------------------- 1 file changed, 16 insertions(+), 23 deletions(-) diff --git a/components/home.js b/components/home.js index 1d66b53..f13e4bf 100644 --- a/components/home.js +++ b/components/home.js @@ -1,11 +1,11 @@ import React, { Component } from 'react' -import { ScrollView, View, TouchableOpacity, TouchableHighlight, Dimensions } from 'react-native' +import { ScrollView, View, TouchableHighlight, Dimensions } from 'react-native' import { LocalDate, ChronoUnit } from 'js-joda' import Icon from 'react-native-vector-icons/Entypo' import { secondaryColor, cycleDayColor, periodColor } from '../styles' import { home as labels, bleedingPrediction as predictLabels, shared } from '../i18n/en/labels' import cycleModule from '../lib/cycle' -import { getCycleDaysSortedByDate } from '../db' +import { getCycleDaysSortedByDate, getCycleDay } from '../db' import { getFertilityStatusForDay } from '../lib/sympto-adapter' import styles from '../styles' import AppText, { AppTextLight } from './app-text' @@ -46,13 +46,8 @@ export default class Home extends Component { return ( - - this.passTodayTo('CycleDay')} - style={styles.homeIconElement} - > + + @@ -72,12 +67,9 @@ export default class Home extends Component { {labels.editToday} - + - this.passTodayTo('BleedingEditView')} - style={styles.homeIconElement} - > + @@ -94,20 +86,21 @@ export default class Home extends Component { } - - - this.props.navigate('Chart')} - style={styles.homeIconElement} - > + + - {this.state.phase ? @@ -133,7 +126,7 @@ export default class Home extends Component { backgroundColor={secondaryColor}> {labels.checkFertility} - +