Merge branch '285-bug-coming-from-track-your-period-cycle-day-doesn-t-show-data' into 'master'
Handing over cycleday to homescreen so that BleedingEditView gets this info; co-authored @liv-theo Closes #285 See merge request bloodyhealth/drip!195
This commit is contained in:
+11
-7
@@ -1,19 +1,20 @@
|
|||||||
|
import { ChronoUnit, LocalDate } from 'js-joda'
|
||||||
import React, { Component } from 'react'
|
import React, { Component } from 'react'
|
||||||
import { ScrollView, View, TouchableHighlight, Dimensions } from 'react-native'
|
import { Dimensions, ScrollView, TouchableHighlight, View } from 'react-native'
|
||||||
import { LocalDate, ChronoUnit } from 'js-joda'
|
|
||||||
import Icon from 'react-native-vector-icons/Entypo'
|
import Icon from 'react-native-vector-icons/Entypo'
|
||||||
import { secondaryColor, cycleDayColor, periodColor } from '../styles'
|
|
||||||
|
import DripHomeIcon from '../assets/drip-home-icons'
|
||||||
|
import { getCycleDay } from '../db'
|
||||||
import {
|
import {
|
||||||
home as labels,
|
|
||||||
bleedingPrediction as predictLabels,
|
bleedingPrediction as predictLabels,
|
||||||
|
home as labels,
|
||||||
shared,
|
shared,
|
||||||
} from '../i18n/en/labels'
|
} from '../i18n/en/labels'
|
||||||
import links from '../i18n/en/links'
|
import links from '../i18n/en/links'
|
||||||
import cycleModule from '../lib/cycle'
|
import cycleModule from '../lib/cycle'
|
||||||
import { getFertilityStatusForDay } from '../lib/sympto-adapter'
|
import { getFertilityStatusForDay } from '../lib/sympto-adapter'
|
||||||
import styles from '../styles'
|
import styles, { cycleDayColor, periodColor, secondaryColor } from '../styles'
|
||||||
import AppText from './app-text'
|
import AppText from './app-text'
|
||||||
import DripHomeIcon from '../assets/drip-home-icons'
|
|
||||||
import Button from './button'
|
import Button from './button'
|
||||||
|
|
||||||
const ShowMoreToggler = ({ isShowingMore, onToggle }) => {
|
const ShowMoreToggler = ({ isShowingMore, onToggle }) => {
|
||||||
@@ -83,7 +84,10 @@ export default class Home extends Component {
|
|||||||
|
|
||||||
passTodayTo(componentName) {
|
passTodayTo(componentName) {
|
||||||
const { navigate } = this.props
|
const { navigate } = this.props
|
||||||
navigate(componentName, { date: LocalDate.now().toString() })
|
navigate(componentName, {
|
||||||
|
date: this.todayDateString,
|
||||||
|
cycleDay: getCycleDay(this.todayDateString)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
toggleShowingMore = () => {
|
toggleShowingMore = () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user