fixed dropdown shown on their profile && enhanced

This commit is contained in:
u-e 2019-05-07 15:55:42 +03:00
parent bcf799620e
commit 43fb1538cd
5 changed files with 19 additions and 10 deletions

View File

@ -24,7 +24,7 @@ const WalletLineItem = ({
textColor,
index,
style,
dropdown,
isHasdropdown,
dropdownOptions,
onDropdownSelect,
}) => (
@ -77,7 +77,7 @@ const WalletLineItem = ({
</Text>
</View>
)}
{dropdown && (
{isHasdropdown && (
<View style={styles.dropdownWrapper}>
<DropdownButton
isHasChildIcon

View File

@ -13,6 +13,7 @@ export default EStyleSheet.create({
},
text: {
color: '$primaryBlack',
fontWeight: '600',
},
rightPart: {
flex: 2,

View File

@ -116,6 +116,7 @@ class WalletView extends PureComponent {
<WalletDetails
intl={intl}
walletData={walletData}
isShowDropdowns={currentAccountUsername === selectedUsername}
/>
</CollapsibleCard>
<Transaction walletData={walletData} />

View File

@ -48,9 +48,16 @@ class WalletContainer extends PureComponent {
};
render() {
const { intl, walletData } = this.props;
const { intl, walletData, isShowDropdowns } = this.props;
return <WalletDetailsView intl={intl} walletData={walletData} navigate={this._navigate} />;
return (
<WalletDetailsView
intl={intl}
walletData={walletData}
navigate={this._navigate}
isShowDropdowns={isShowDropdowns}
/>
);
}
}

View File

@ -29,7 +29,9 @@ class WalletDetailsView extends PureComponent {
// Component Functions
render() {
const { walletData, intl, navigate } = this.props;
const {
walletData, intl, navigate, isShowDropdowns,
} = this.props;
const steemDropdown = ['transferToken', 'transferToSaving', 'powerUp'];
const sbdDropdown = ['transferToken', 'transferToSaving'];
@ -42,10 +44,8 @@ class WalletDetailsView extends PureComponent {
iconName="ios-information-circle-outline"
rightText={`${Math.round(walletData.balance * 1000) / 1000} STEEM`}
isBoldText
dropdown
dropdownOptions={steemDropdown.map(item =>
intl.formatMessage({ id: `transfer.${item}` }),
)}
isHasdropdown={isShowDropdowns}
dropdownOptions={steemDropdown.map(item => intl.formatMessage({ id: `transfer.${item}` }))}
onDropdownSelect={index => navigate(steemDropdown[index], 'STEEM')}
/>
<GrayWrapper isGray>
@ -96,7 +96,7 @@ class WalletDetailsView extends PureComponent {
iconName="ios-information-circle-outline"
rightText={`$${Math.round(walletData.sbdBalance * 1000) / 1000}`}
isBoldText
dropdown
isHasdropdown={isShowDropdowns}
dropdownOptions={sbdDropdown.map(item => intl.formatMessage({ id: `transfer.${item}` }))}
onDropdownSelect={a => navigate(steemDropdown[a], 'SBD')}
/>