Skip to content
Snippets Groups Projects
Commit 9eb1ad6a authored by Julia Friesel's avatar Julia Friesel
Browse files

Simplify home screen markup

parent 0c92c85b
No related branches found
No related tags found
No related merge requests found
...@@ -5,7 +5,7 @@ import { ...@@ -5,7 +5,7 @@ import {
Text Text
} from 'react-native' } from 'react-native'
import { LocalDate } from 'js-joda' import { LocalDate } from 'js-joda'
import styles from '../styles/index' import styles from '../styles'
import cycleDayModule from '../lib/get-cycle-day-number' import cycleDayModule from '../lib/get-cycle-day-number'
import { getOrCreateCycleDay, bleedingDaysSortedByDate, deleteAll } from '../db' import { getOrCreateCycleDay, bleedingDaysSortedByDate, deleteAll } from '../db'
...@@ -46,37 +46,31 @@ export default class Home extends Component { ...@@ -46,37 +46,31 @@ export default class Home extends Component {
render() { render() {
const navigate = this.props.navigation.navigate const navigate = this.props.navigation.navigate
return ( return (
<View style={ styles.homeContainerView }> <View>
<View style={{flex: 2}}> <Text style={styles.welcome}>{this.state.welcomeText}</Text>
<View> <View style={styles.homeButtons}>
<Text style={styles.welcome}>{this.state.welcomeText}</Text> <Button
</View> onPress={() => this.passTodayToDayView()}
title="Edit symptoms for today">
</Button>
</View> </View>
<View style={ styles.homeButtonsView}> <View style={styles.homeButton}>
<View> <Button
<Button onPress={() => navigate('calendar')}
onPress={() => this.passTodayToDayView()} title="Go to calendar">
title="Edit symptoms for today"> </Button>
</Button> </View>
</View> <View style={styles.homeButton}>
<View> <Button
<Button onPress={() => navigate('chart')}
onPress={() => navigate('calendar')} title="Go to chart">
title="Go to calendar"> </Button>
</Button> </View>
</View> <View style={styles.homeButton}>
<View> <Button
<Button onPress={() => deleteAll()}
onPress={() => navigate('chart')} title="delete everything">
title="Go to chart"> </Button>
</Button>
</View>
<View>
<Button
onPress={() => deleteAll()}
title="delete everything">
</Button>
</View>
</View> </View>
</View> </View>
) )
......
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