Skip to content
Snippets Groups Projects
Commit cd3cc3c7 authored by tina's avatar tina
Browse files

Merge branch 'master' into '28-edit-temperature-screen'

# Conflicts:
#   home.js
parents f2ad9f10 73c5785f
No related branches found
No related tags found
No related merge requests found
image: jfr3000/docker-nativescript
image: node:8
# This folder is cached between builds
# http://docs.gitlab.com/ce/ci/yaml/README.html#cache
......
......@@ -4,19 +4,32 @@ import {
Button,
Text
} from 'react-native'
import { LocalDate } from 'js-joda'
import styles from './styles'
import getCycleDay from './get-cycle-day'
import { getOrCreateCycleDay } from './db'
export default class Home extends Component {
constructor(props) {
super(props)
}
passTodayToDayView() {
const todayDateString = LocalDate.now().toString()
const cycleDay = getOrCreateCycleDay(todayDateString)
const navigate = this.props.navigation.navigate
navigate('dayView', { cycleDay })
}
render() {
const navigate = this.props.navigation.navigate
return (
<View style={styles.container}>
<Text style={styles.welcome}>Welcome! Today is day {getCycleDay()} of your current cycle</Text>
<Button
onPress={() => this.passTodayToDayView()}
title="Edit symptoms for today">
</Button>
<Button
onPress={() => navigate('calendar')}
title="Go to calendar">
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment