diff --git a/components/TransactionsScreen.tsx b/components/TransactionsScreen.tsx index 117a8e177..3049e2735 100644 --- a/components/TransactionsScreen.tsx +++ b/components/TransactionsScreen.tsx @@ -2,7 +2,7 @@ import React, {useState} from 'react'; import {createStackNavigator} from '@react-navigation/stack'; import {RegText, ZecAmount, UsdAmount, SecondaryButton, FadeText} from '../components/Components'; -import {View, ScrollView, Image, Modal, TouchableOpacity, SafeAreaView, RefreshControl, Clipboard} from 'react-native'; +import {View, ScrollView, Image, Modal, TouchableOpacity, SafeAreaView, RefreshControl, Clipboard,FlatList} from 'react-native'; import Toast from 'react-native-simple-toast'; import {TotalBalance, Transaction, Info, SyncStatus} from '../app/AppState'; import Utils from '../app/utils'; @@ -300,31 +300,32 @@ const TransactionsScreenView: React.FunctionComponent - + } - style={{flexGrow: 1, marginTop: 10, width: '100%', height: '100%'}}> - {transactions?.flatMap((t) => { - let txmonth = moment(t.time * 1000).format('MMM YYYY'); - - var month = ''; - if (txmonth !== lastMonth) { - month = txmonth; - lastMonth = txmonth; - } + data={transactions} + renderItem={({item})=>{ + let txmonth = moment(item.time * 1000).format('MMM YYYY'); - return ( + var month = ''; + if (txmonth !== lastMonth) { + month = txmonth; + lastMonth = txmonth; + } + return ( - ); - })} - + key={`${item.txid}-${item.type}`} + tx={item} + month={month} + setTxDetail={setTxDetail} + setTxDetailModalShowing={setTxDetailModalShowing} + /> + ) + } + } + /> ); };