mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-22 04:41:43 +03:00
fix key props related issues
This commit is contained in:
parent
983079f1e3
commit
1512e81add
@ -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';
|
||||
|
||||
|
@ -48,12 +48,12 @@ const TransactionView = ({ transactions, type, refreshing, setRefreshing, isLoad
|
||||
Object.keys(item).length > 0 &&
|
||||
item.value.indexOf(transaction_types[type]) > -1 && (
|
||||
<CollapsibleCard
|
||||
key={item.created.toString()}
|
||||
key={`keyh-${item.created.toString()}`}
|
||||
noBorder
|
||||
noContainer
|
||||
titleComponent={
|
||||
<WalletLineItem
|
||||
key={item.created.toString()}
|
||||
key={`keyt-${item.created.toString()}`}
|
||||
index={index + 1}
|
||||
text={intl.formatMessage({
|
||||
id: `wallet.${get(item, 'textKey')}`,
|
||||
@ -71,7 +71,7 @@ const TransactionView = ({ transactions, type, refreshing, setRefreshing, isLoad
|
||||
>
|
||||
{(get(item, 'details') || get(item, 'memo')) && (
|
||||
<WalletLineItem
|
||||
key={index.toString()}
|
||||
key={`keyd-${item.created.toString()}`}
|
||||
text={get(item, 'details', '')}
|
||||
isBlackText
|
||||
isThin
|
||||
@ -92,6 +92,7 @@ const TransactionView = ({ transactions, type, refreshing, setRefreshing, isLoad
|
||||
onRefresh={refreshControl}
|
||||
refreshing={refreshing}
|
||||
renderItem={({ item, index }) => _renderItem(item, index)}
|
||||
keyExtractor={(item, index) => index.toString()}
|
||||
/>
|
||||
</View>
|
||||
);
|
||||
|
@ -54,9 +54,9 @@ const WalletHeaderView = ({
|
||||
}
|
||||
}, [reload]);
|
||||
|
||||
const _getBalanceItem = (balance, options, key) =>
|
||||
const _getBalanceItem = (balance, options, _key) =>
|
||||
balance !== undefined && (
|
||||
<View style={styles.balanceWrapper}>
|
||||
<View style={styles.balanceWrapper} key={balance + _key}>
|
||||
<Text style={styles.balanceText}>{balance}</Text>
|
||||
<DropdownButton
|
||||
dropdownRowWrapper={styles.dropdownRowStyle}
|
||||
@ -71,7 +71,7 @@ const WalletHeaderView = ({
|
||||
dropdownStyle={styles.dropdownStyle}
|
||||
iconStyle={styles.dropdownIconStyle}
|
||||
/>
|
||||
<Text style={styles.subText}>{intl.formatMessage({ id: `wallet.${key}.title` })}</Text>
|
||||
<Text style={styles.subText}>{intl.formatMessage({ id: `wallet.${_key}.title` })}</Text>
|
||||
</View>
|
||||
);
|
||||
|
||||
@ -106,8 +106,9 @@ const WalletHeaderView = ({
|
||||
)}
|
||||
|
||||
{valueDescriptions &&
|
||||
valueDescriptions.map(item => (
|
||||
valueDescriptions.map((item, _index) => (
|
||||
<WalletLineItem
|
||||
key={`keyl-${_index.toString()}`}
|
||||
fitContent
|
||||
style={styles.valueDescriptions}
|
||||
text={intl.formatMessage({ id: `wallet.${get(item, 'textKey')}` })}
|
||||
|
Loading…
Reference in New Issue
Block a user