diff --git a/components/bleeding.js b/components/bleeding.js deleted file mode 100644 index 5fc6250..0000000 --- a/components/bleeding.js +++ /dev/null @@ -1,102 +0,0 @@ -import React, { Component } from 'react' -import { - View, - Button, - Text, - Switch -} from 'react-native' -import RadioForm from 'react-native-simple-radio-button' -import styles from '../styles/index' -import { saveBleeding } from '../db' -import { bleeding as bleedingLabels } from '../labels/labels' - -export default class Bleeding extends Component { - constructor(props) { - super(props) - this.cycleDay = props.cycleDay - this.showView = props.showView - let bleedingValue = this.cycleDay.bleeding && this.cycleDay.bleeding.value - if (! (typeof bleedingValue === 'number') ){ - bleedingValue = -1 - } - this.state = { - currentValue: bleedingValue, - exclude: this.cycleDay.bleeding ? this.cycleDay.bleeding.exclude : false - } - } - - render() { - const bleedingRadioProps = [ - {label: bleedingLabels[0], value: 0 }, - {label: bleedingLabels[1], value: 1 }, - {label: bleedingLabels[2], value: 2 }, - {label: bleedingLabels[3], value: 3 }, - ] - return ( - - - - - Bleeding - - - { - this.setState({currentValue: itemValue}) - }} - /> - - - - - Exclude - - - { - this.setState({exclude: val}) - }} - value={this.state.exclude} - /> - - - - - - - - - - - - - - - - ) - } -} diff --git a/components/cycle-day/action-buttons.js b/components/cycle-day/action-buttons.js index 0008552..eb33201 100644 --- a/components/cycle-day/action-buttons.js +++ b/components/cycle-day/action-buttons.js @@ -24,7 +24,7 @@ export default function (showView) { saveAction() showView('dayView') }, - disabled: saveDisabled + disabledCondition: saveDisabled } ] diff --git a/components/cycle-day/cycle-day-overview.js b/components/cycle-day/cycle-day-overview.js index 1212e13..13d43a4 100644 --- a/components/cycle-day/cycle-day-overview.js +++ b/components/cycle-day/cycle-day-overview.js @@ -10,9 +10,9 @@ import { mucusFeeling as feelingLabels, mucusTexture as textureLabels, mucusNFP as computeSensiplanMucusLabels, -} from '../labels/labels' -import cycleDayModule from '../lib/get-cycle-day-number' -import { bleedingDaysSortedByDate } from '../db' +} from './labels/labels' +import cycleDayModule from '../../lib/get-cycle-day-number' +import { bleedingDaysSortedByDate } from '../../db' const getCycleDayNumber = cycleDayModule() @@ -91,11 +91,9 @@ export default class DayView extends Component { - - - Mucus - - + + Mucus + - - - - - - - - - - - - - - ) - } -}