import React from 'react';
import {View, Text} from 'react-native';
import HeaderBack from '../../components/Header/HeaderBack';
import {connect} from 'react-redux';

import {WebView} from 'react-native-webview';

const Contract = (props) => {
  console.log(props.user);
  return (
    <View style={{flex: 1}}>
      <HeaderBack isWhite={true} title={'Contract'} />

      <WebView
        androidHardwareAccelerationDisabled={true}
        source={{
          uri:
            'http://api.dcvinvest.com/webview/contracts/show/' + props.user.uid,
        }}
      />
    </View>
  );
};

const mapStateToProps = (state) => {
  return {
    user: state.userReducer,
  };
};
export default connect(mapStateToProps, {})(Contract);
