Advertisement
Guest User

registerScreen.js

a guest
Jul 16th, 2019
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import React, { Component } from "react";
  2. import {
  3.   StyleSheet,
  4.   TextInput,
  5.   ScrollView,
  6.   TouchableOpacity,
  7.   Image
  8. } from "react-native";
  9. import {
  10.   View,
  11.   Form,
  12.   Label,
  13.   Icon,
  14.   Text,
  15.   Container,
  16.   Content,
  17.   Button
  18. } from "native-base";
  19. import { connect } from "react-redux";
  20. import Modal from "react-native-modal";
  21. import globalStyles, { colors, height, width } from "../customLib/globalStyle";
  22. import { registerUser } from "../Redux/actions/auth";
  23.  
  24. class RegisterScreen extends Component {
  25.   registerAction = () => {
  26.     this.props.updatePage(0);
  27.   };
  28.  
  29.   render() {
  30.     return (
  31.       <Container>
  32.             ...
  33.  
  34.               <TouchableOpacity
  35.                 onPress={() => this.registerAction()}
  36.               >
  37.                 <Text
  38.                   style={[
  39.                     globalStyles.font,
  40.                     { color: "white", fontSize: 18, fontWeight: "bold" }
  41.                   ]}
  42.                 >
  43.                   Daftar Sekarang
  44.                 </Text>
  45.               </TouchableOpacity>
  46.  
  47.             ...
  48.       </Container>
  49.     );
  50.   }
  51. }
  52.  
  53. const mapStateToProps = ({ auth }) => ({
  54.   isLoading: auth.isLoading
  55. });
  56.  
  57. const mapDispatchToProps = dispatch => ({
  58.   registerUser: param => dispatch(registerUser(param))
  59. });
  60.  
  61. export default connect(
  62.   mapStateToProps,
  63.   mapDispatchToProps
  64. )(RegisterScreen);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement