Merge pull request #1076 from esteemapp/general/fix

created poins memo description
This commit is contained in:
Mustafa Buyukcelebi 2019-08-26 01:11:38 +03:00 committed by GitHub
commit 44c911740c
3 changed files with 32 additions and 13 deletions

View File

@ -1,3 +1,4 @@
/* eslint-disable react/jsx-wrap-multilines */
import React, { Component, Fragment } from 'react'; import React, { Component, Fragment } from 'react';
import { Text, View, FlatList, ScrollView, RefreshControl, TouchableOpacity } from 'react-native'; import { Text, View, FlatList, ScrollView, RefreshControl, TouchableOpacity } from 'react-native';
import { injectIntl } from 'react-intl'; import { injectIntl } from 'react-intl';
@ -11,6 +12,7 @@ import { IconButton } from '../../iconButton';
import { Icon } from '../../icon'; import { Icon } from '../../icon';
import { MainButton } from '../../mainButton'; import { MainButton } from '../../mainButton';
import { DropdownButton } from '../../dropdownButton'; import { DropdownButton } from '../../dropdownButton';
import { CollapsibleCard } from '../../collapsibleCard';
// Utils // Utils
import { getTimeFromNow } from '../../../utils/time'; import { getTimeFromNow } from '../../../utils/time';
@ -198,17 +200,33 @@ class PointsView extends Component {
keyExtractor={item => item.id.toString()} keyExtractor={item => item.id.toString()}
ListEmptyComponent={this._renderLoading()} ListEmptyComponent={this._renderLoading()}
renderItem={({ item, index }) => ( renderItem={({ item, index }) => (
<WalletLineItem <CollapsibleCard
index={index + 1} noBorder
text={this._getTranslation(get(item, 'textKey'))} noContainer
description={getTimeFromNow(get(item, 'created'))} key={item.id.toString()}
isCircleIcon titleComponent={
isThin <WalletLineItem
isBlackText index={index + 1}
iconName={get(item, 'icon')} text={this._getTranslation(get(item, 'textKey'))}
iconType={get(item, 'iconType')} description={getTimeFromNow(get(item, 'created'))}
rightText={`${get(item, 'amount')} ESTM`} isCircleIcon
/> isThin
isBlackText
iconName={get(item, 'icon')}
iconType={get(item, 'iconType')}
rightText={`${get(item, 'amount')} ESTM`}
/>
}
>
{(get(item, 'memo') || get(item, 'sender')) && (
<WalletLineItem
isBlackText
isThin
text={`${intl.formatMessage({ id: 'points.from' })} ${get(item, 'sender')}`}
description={get(item, 'memo')}
/>
)}
</CollapsibleCard>
)} )}
/> />
</View> </View>

View File

@ -85,7 +85,7 @@ class TransactionView extends PureComponent {
{(get(transactionData, 'details') || get(transactionData, 'memo')) && ( {(get(transactionData, 'details') || get(transactionData, 'memo')) && (
<WalletLineItem <WalletLineItem
key={index.toString()} key={index.toString()}
text={get(transactionData, 'details', 'pipi')} text={get(transactionData, 'details', '')}
isBlackText isBlackText
isThin isThin
description={get(transactionData, 'memo')} description={get(transactionData, 'memo')}

View File

@ -69,7 +69,8 @@
"checkin_extra_desc": "Consistent use of app gives you extra chances to earn more 10 points, be more active and earn more.", "checkin_extra_desc": "Consistent use of app gives you extra chances to earn more 10 points, be more active and earn more.",
"dropdown_transfer": "Gift", "dropdown_transfer": "Gift",
"dropdown_promote": "Promote", "dropdown_promote": "Promote",
"dropdown_boost": "Boost" "dropdown_boost": "Boost",
"from": "From"
}, },
"messages": { "messages": {
"comingsoon": "Messages feature is coming soon!" "comingsoon": "Messages feature is coming soon!"