Skip to content

Instantly share code, notes, and snippets.

@leandrojo
Last active November 2, 2018 20:19
Show Gist options
  • Select an option

  • Save leandrojo/be5129979bca7c6d970c70634b8745af to your computer and use it in GitHub Desktop.

Select an option

Save leandrojo/be5129979bca7c6d970c70634b8745af to your computer and use it in GitHub Desktop.
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