Last active
October 24, 2017 08:23
-
-
Save stabenfeldt/f99956fc0f2296a2bb1ca5e4501e35fe to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react' | |
import { ScrollView, Text, Image, View } from 'react-native' | |
import DevscreensButton from '../../ignite/DevScreens/DevscreensButton.js' | |
import RoundedButton from '../Components/RoundedButton.js' | |
import getUserToken from '../Sagas/AuthSagas.js'; | |
import { connect } from 'react-redux' | |
import { Images } from '../Themes' | |
// Styles | |
import styles from './Styles/LaunchScreenStyles' | |
// <RoundedButton text="Fetch and store token" onPress={() => window.alert('Rounded Button Pressed!')} /> | |
class LaunchScreen extends Component { | |
render () { | |
return ( | |
<View style={styles.mainContainer}> | |
<Image source={Images.background} style={styles.backgroundImage} resizeMode='stretch' /> | |
<ScrollView style={styles.container}> | |
<View style={styles.centered}> | |
<Image source={Images.launch} style={styles.logo} /> | |
</View> | |
<View style={styles.section} > | |
<Image source={Images.ready} /> | |
<Text style={styles.sectionText}> | |
Hi Martin | |
</Text> | |
</View> | |
<RoundedButton text="Fetch and store token" onPress={ getUserToken } /> | |
<DevscreensButton /> | |
</ScrollView> | |
</View> | |
) | |
} | |
} | |
const mapStateToProps = (state) => { | |
return { | |
// ...redux state to props here | |
} | |
} | |
const mapDispatchToProps = (dispatch) => { | |
return { | |
} | |
} | |
export default connect(mapStateToProps, mapDispatchToProps)(LaunchScreen) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment