From 1512e81adde2b3ebf1b3246e429942c28b37b0af Mon Sep 17 00:00:00 2001 From: feruz Date: Mon, 23 Dec 2019 09:34:11 +0200 Subject: [PATCH] fix key props related issues --- .../basicUIElements/view/userListItem/userListItem.js | 1 - src/components/transaction/transactionView.js | 7 ++++--- src/components/walletHeader/view/walletHeaderView.js | 9 +++++---- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/components/basicUIElements/view/userListItem/userListItem.js b/src/components/basicUIElements/view/userListItem/userListItem.js index 82b6cf219..a073b4380 100644 --- a/src/components/basicUIElements/view/userListItem/userListItem.js +++ b/src/components/basicUIElements/view/userListItem/userListItem.js @@ -1,6 +1,5 @@ import React from 'react'; import { View, Text, TouchableOpacity } from 'react-native'; -import { FormattedRelativeTime } from 'react-intl'; import { UserAvatar } from '../../../userAvatar'; import styles from './userListItemStyles'; diff --git a/src/components/transaction/transactionView.js b/src/components/transaction/transactionView.js index 79dceb125..e9505c612 100644 --- a/src/components/transaction/transactionView.js +++ b/src/components/transaction/transactionView.js @@ -48,12 +48,12 @@ const TransactionView = ({ transactions, type, refreshing, setRefreshing, isLoad Object.keys(item).length > 0 && item.value.indexOf(transaction_types[type]) > -1 && ( {(get(item, 'details') || get(item, 'memo')) && ( _renderItem(item, index)} + keyExtractor={(item, index) => index.toString()} /> ); diff --git a/src/components/walletHeader/view/walletHeaderView.js b/src/components/walletHeader/view/walletHeaderView.js index 600e7fc20..8e110a7f3 100644 --- a/src/components/walletHeader/view/walletHeaderView.js +++ b/src/components/walletHeader/view/walletHeaderView.js @@ -54,9 +54,9 @@ const WalletHeaderView = ({ } }, [reload]); - const _getBalanceItem = (balance, options, key) => + const _getBalanceItem = (balance, options, _key) => balance !== undefined && ( - + {balance} - {intl.formatMessage({ id: `wallet.${key}.title` })} + {intl.formatMessage({ id: `wallet.${_key}.title` })} ); @@ -106,8 +106,9 @@ const WalletHeaderView = ({ )} {valueDescriptions && - valueDescriptions.map(item => ( + valueDescriptions.map((item, _index) => (