SHARE
TWEET

Untitled

a guest Sep 17th, 2019 100 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import React, { Component } from 'react'
  2. import { ScrollView, KeyboardAvoidingView, View, TouchableWithoutFeedback, Image, Content, ImageBackground, TouchableOpacity } from 'react-native'
  3. import { connect } from 'react-redux'
  4. import { Container, Text, Left, Right, Header, Icon, CardItem, Card, Button } from 'native-base';
  5. import Inpoin from '../Images/inpoin_logo.png'
  6. import styles from './Styles/DompetInpoinScreenStyle'
  7. import dompetInpoinAction from "../Redux/DompetInpoinRedux";
  8.  
  9. const { dompetInpoinAction } = this.props;
  10.  
  11. class DompetInpoinScreen extends Component {
  12.   onclick = (errors) => {
  13.     console.log({errors})
  14.     alert('On click works')
  15.   }
  16.   render () {
  17.     return (
  18.       <Container style={{ backgroundColor: '#FFFFFF' }}>
  19.         <View>
  20.           <Header noShadow={true} style={{ backgroundColor: '#FFFFFF' }}>
  21.             <Left>
  22.               <TouchableWithoutFeedback onPress={this.onclick}>
  23.                 <Image resizeMode="contain" style={{ height: '70%', width: '100%' }} source={require('../Images/inpoin_logo.png')} />
  24.               </TouchableWithoutFeedback>
  25.             </Left>
  26.             <Right>
  27.               <TouchableWithoutFeedback onPress={this.onclick}>
  28.                 <Image resizeMode="contain" style={{right: 10}} source={require('../Images/account_circle.png')} />
  29.               </TouchableWithoutFeedback>
  30.               <TouchableWithoutFeedback onPress={this.onclick}>
  31.                 <Image resizeMode="contain" source={require('../Images/history.png')} />
  32.               </TouchableWithoutFeedback>
  33.             </Right>
  34.           </Header>
  35.           </View>
  36.           <View>
  37.           <View style={{ marginTop: 28, flexDirection: 'row' }}>
  38.           <Left>
  39.               <View style={{ justifyContent: 'flex-start', left: 20 }}>
  40.                 <Text style={{ fontSize: 14, fontWeight: 'bold' }}>Dompet InPoin</Text>
  41.               </View>
  42.             </Left>
  43.             <Right>
  44.               <View style={{ borderBottomWidth: 1, borderBottomColor: '#C4C4C4', width: '125%', justifyContent: 'flex-end' }} />
  45.             </Right>
  46.           </View>
  47.           <ScrollView style={{ marginTop: 20 }}>
  48.               <Card style={{ width: '90%', borderRadius: 5, justifyContent: 'center', alignSelf: 'center' }}>
  49.               <CardItem style={{ borderRadius: 5 }}>
  50.                 <View>
  51.                   <Image resizeMode="contain" source={require('../Images/link_aja.png')} />
  52.                 </View>
  53.                 <View style={{ flexDirection: 'column', width: '50%', left: 10 }}>
  54.                   <Text style={{ fontSize: 9, fontWeight: 'bold' }}>Link Aja!</Text>
  55.                   <Text style={{ fontSize: 9 }}>{this.props.dompetInpoin.friends.provider}</Text>
  56.                   <View style={{ top: 5 }}>
  57.                   <TouchableOpacity onPress={() => this.onclick} style={{ width: '55%', elevation: 2, shadowOpacity: 1, backgroundColor: '#E11715', height: 35, borderRadius: 5 }}>
  58.                     <Text style={{ color: '#FFFFFF', textAlignVertical: "center",
  59.                 textAlign: "center", top: 8, fontSize: 12, fontWeight: 'bold' }}>Hubungkan</Text>
  60.                   </TouchableOpacity>
  61.                   </View>
  62.                 </View>
  63.                 <Right style={{ left: 10 }}>
  64.                 <TouchableWithoutFeedback onPress={this.onclick}>
  65.                   <Image resizeMode="contain" source={require('../Images/switch_disable.png')} />
  66.                 </TouchableWithoutFeedback>
  67.                 </Right>
  68.               </CardItem>
  69.               </Card>
  70.           </ScrollView>
  71.           </View>
  72.       </Container>
  73.     )
  74.   }
  75. }
  76.  
  77. const mapStateToProps = (state) => {
  78.   return {
  79.     dompetInpoin: state.dompetInpoin
  80.   }
  81. }
  82.  
  83. const mapDispatchToProps = (dispatch) => {
  84.   return {
  85.     dompetInpoinAction : dompetInpoinAction.dompetInpoinRequest
  86.   }
  87. }
  88.  
  89. export default connect(mapStateToProps, mapDispatchToProps)(DompetInpoinScreen)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top