added emty wallet component

This commit is contained in:
ue 2018-10-04 01:49:56 +03:00
parent fb7a92563d
commit f50a2e7b46
5 changed files with 88 additions and 11 deletions

View File

@ -55,11 +55,8 @@ class ProfileScreen extends React.Component {
};
}
constructor() {
super();
this.getBlog = this.getBlog.bind(this);
this.getMore = this.getMore.bind(this);
this.getComments = this.getComments.bind(this);
constructor(props) {
super(props);
this.state = {
user: [],
posts: [],
@ -102,8 +99,8 @@ class ProfileScreen extends React.Component {
about: about && about.profile,
},
() => {
this.getBlog(userData[0].username);
this.getComments(userData[0].username);
this._getBlog(userData[0].username);
this._getComments(userData[0].username);
}
);
}
@ -119,7 +116,7 @@ class ProfileScreen extends React.Component {
);
};
getBlog = user => {
_getBlog = user => {
this.setState({ isLoading: true });
getPosts("blog", { tag: user, limit: 10 }, user)
.then(result => {
@ -137,7 +134,7 @@ class ProfileScreen extends React.Component {
});
};
getMore = async () => {
_getMore = async () => {
console.log("get more");
await getPosts(
"blog",
@ -161,7 +158,7 @@ class ProfileScreen extends React.Component {
});
};
getComments = async user => {
_getComments = async user => {
await getUserComments({ start_author: user, limit: 10 })
.then(result => {
this.setState({
@ -252,7 +249,7 @@ class ProfileScreen extends React.Component {
keyExtractor={(post, index) => index.toString()}
onEndReached={info => {
if (!isLoading) {
this.getMore();
this._getMore();
}
}}
onEndThreshold={0}

View File

@ -0,0 +1,39 @@
import React, { Component } from "react";
//import { connect } from "react-redux";
// Services and Actions
// Middleware
// Constants
// Utilities
// Component
import { WalletView } from "../";
/*
* Props Name Description Value
*@props --> props name here description here Value Type Here
*
*/
class WalletContainer extends Component {
constructor(props) {
super(props);
this.state = {};
}
// Component Life Cycle Functions
// Component Functions
render() {
// eslint-disable-next-line
//const {} = this.props;
return <WalletView {...this.props} />;
}
}
export default WalletContainer;

5
src/wallet/index.js Normal file
View File

@ -0,0 +1,5 @@
import WalletView from "./view/walletView";
import Wallet from "./container/walletContainer";
export { WalletView, Wallet };
export default Wallet;

View File

View File

@ -0,0 +1,36 @@
import React, { Component } from "react";
import {} from "react-native";
// Constants
// Components
// Styles
// eslint-disable-next-line
import styles from "./_styles";
class WalletView extends Component {
/* Props
* ------------------------------------------------
* @prop { type } name - Description....
*/
constructor(props) {
super(props);
this.state = {};
}
// Component Life Cycles
// Component Functions
render() {
// eslint-disable-next-line
const {} = this.props;
// eslint-disable-next-line
return <ElementName />;
}
}
export default WalletView;