lbry-android/app/src/page/transactionHistory/view.js
akinwale 3706bc5936
Wallet implementation (#92)
* Created walletAddress and walletBalance components
* Added walletSend and transaction list components.
* added transaction history page
2018-05-03 19:58:31 +01:00

29 lines
839 B
JavaScript

import React from 'react';
import { View, ScrollView, Text } from 'react-native';
import TransactionList from '../../component/transactionList';
import walletStyle from '../../styles/wallet';
class TransactionHistoryPage extends React.PureComponent {
componentDidMount() {
this.props.fetchTransactions();
}
render() {
const { fetchingTransactions, transactions } = this.props;
return (
<ScrollView>
<View style={walletStyle.historyList}>
{fetchingTransactions && !transactions.length && (
<Text style={walletStyle.infoText}>Loading transactions...</Text>
)}
{transactions && transactions.length && (
<TransactionList transactions={transactions} />
)}
</View>
</ScrollView>
);
}
}
export default TransactionHistoryPage;