Use react-navigation to navigate away from home screen
This commit is contained in:
@@ -5,22 +5,25 @@ import {
|
||||
Text
|
||||
} from 'react-native'
|
||||
import styles from './styles'
|
||||
import { createStackNavigator } from 'react-navigation'
|
||||
import temperatureList from './List'
|
||||
|
||||
export default class home extends Component {
|
||||
class home extends Component {
|
||||
constructor(props) {
|
||||
super(props)
|
||||
}
|
||||
|
||||
render() {
|
||||
const navigate = this.props.navigation.navigate
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
<Text style={styles.welcome}>Welcome! Today is day 6 of your current cycle</Text>
|
||||
<Button
|
||||
onPress={goToSymptomEdit}
|
||||
onPress={() => navigate('temperatureList')}
|
||||
title="Edit symptoms for today">
|
||||
</Button>
|
||||
<Button
|
||||
onPress={goToCalendar}
|
||||
onPress={() => {}}
|
||||
title="Go to calendar">
|
||||
</Button>
|
||||
</View>
|
||||
@@ -28,7 +31,7 @@ export default class home extends Component {
|
||||
}
|
||||
}
|
||||
|
||||
function goToSymptomEdit () {
|
||||
|
||||
}
|
||||
function goToCalendar () {}
|
||||
export default createStackNavigator({
|
||||
home: { screen: home },
|
||||
temperatureList: { screen: temperatureList }
|
||||
})
|
||||
Reference in New Issue
Block a user