Position footer and fix navigating to cycle day view
This commit is contained in:
@@ -27,7 +27,7 @@ export default class CycleDayOverView extends Component {
|
||||
constructor(props) {
|
||||
super(props)
|
||||
this.state = {
|
||||
cycleDay: props.navigation.state.params.cycleDay
|
||||
cycleDay: props.cycleDay
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ export default class CycleDayOverView extends Component {
|
||||
}
|
||||
|
||||
navigate(symptom) {
|
||||
this.props.navigation.navigate('SymptomView', {
|
||||
this.props.navigate('SymptomView', {
|
||||
symptom,
|
||||
cycleDay: this.state.cycleDay
|
||||
})
|
||||
@@ -53,7 +53,7 @@ export default class CycleDayOverView extends Component {
|
||||
return (
|
||||
<ScrollView>
|
||||
<Header
|
||||
cycleDayOverView={true}
|
||||
isCycleDayOverView={true}
|
||||
cycleDayNumber={cycleDayNumber}
|
||||
date={cycleDay.date}
|
||||
/>
|
||||
|
||||
@@ -10,7 +10,7 @@ import { formatDateForViewHeader } from '../components/cycle-day/labels/format'
|
||||
export default class Header extends Component {
|
||||
render() {
|
||||
return (
|
||||
this.props.cycleDayOverView ?
|
||||
this.props.isCycleDayOverView ?
|
||||
<View style={[styles.header, styles.headerCycleDay]}>
|
||||
<Icon
|
||||
name='arrow-left-drop-circle'
|
||||
|
||||
+1
-2
@@ -6,7 +6,6 @@ import {
|
||||
ScrollView
|
||||
} from 'react-native'
|
||||
import { LocalDate } from 'js-joda'
|
||||
import Header from './header'
|
||||
import styles from '../styles/index'
|
||||
import cycleModule from '../lib/cycle'
|
||||
import { getOrCreateCycleDay, bleedingDaysSortedByDate, fillWithDummyData, deleteAll } from '../db'
|
||||
@@ -42,7 +41,7 @@ export default class Home extends Component {
|
||||
passTodayToDayView() {
|
||||
const todayDateString = LocalDate.now().toString()
|
||||
const cycleDay = getOrCreateCycleDay(todayDateString)
|
||||
const navigate = this.props.navigation.navigate
|
||||
const navigate = this.props.navigate
|
||||
navigate('CycleDay', { cycleDay })
|
||||
}
|
||||
|
||||
|
||||
@@ -13,6 +13,12 @@ export default class Menu extends Component {
|
||||
placeActionButtons()
|
||||
:
|
||||
<View style={styles.menu}>
|
||||
<Text
|
||||
style={styles.dateHeader}
|
||||
onPress={() => this.props.navigate('Home')}
|
||||
>
|
||||
{'Home'}
|
||||
</Text>
|
||||
<Text
|
||||
style={styles.dateHeader}
|
||||
onPress={() => this.props.navigate('Calendar')}
|
||||
|
||||
Reference in New Issue
Block a user