Last active
November 2, 2018 20:19
-
-
Save leandrojo/be5129979bca7c6d970c70634b8745af 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 from "react"; | |
| import { Alert } from "react-native"; | |
| import { connect } from "react-redux"; | |
| import { compose, withHandlers, lifecycle } from "recompose"; | |
| import { css, withStyles, withRouter } from "../../common"; | |
| import Intro from "./Intro"; | |
| function componentDidMount() { | |
| this.props.navigator.setStyle({ navBarHidden: true }); | |
| } | |
| function onPressSignWithoutFacebook({ navigator }) { | |
| return () => { | |
| navigator.push({ | |
| screen: "screen.Register" | |
| }); | |
| }; | |
| } | |
| function onPressSignWithFacebook() { | |
| return () => { | |
| Alert.alert("Login com o Facebook"); | |
| }; | |
| } | |
| function onPressLogin({ navigator }) { | |
| return () => { | |
| navigator.push({ | |
| screen: "screen.Login" | |
| }); | |
| }; | |
| } | |
| const styles = () => { | |
| return {}; | |
| }; | |
| function mapStateToProps() { | |
| return {}; | |
| } | |
| export default compose( | |
| connect(mapStateToProps), | |
| withRouter, | |
| withStyles(styles), | |
| lifecycle({ | |
| componentDidMount | |
| }), | |
| withHandlers({ | |
| onPressLogin, | |
| onPressSignWithFacebook, | |
| onPressSignWithoutFacebook | |
| }) | |
| )(Intro); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment