mirror of
https://github.com/ecency/ecency-mobile.git
synced 2025-01-01 18:23:02 +03:00
fixed dropdown shown on their profile && enhanced
This commit is contained in:
parent
bcf799620e
commit
43fb1538cd
@ -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
|
||||
|
@ -13,6 +13,7 @@ export default EStyleSheet.create({
|
||||
},
|
||||
text: {
|
||||
color: '$primaryBlack',
|
||||
fontWeight: '600',
|
||||
},
|
||||
rightPart: {
|
||||
flex: 2,
|
||||
|
@ -116,6 +116,7 @@ class WalletView extends PureComponent {
|
||||
<WalletDetails
|
||||
intl={intl}
|
||||
walletData={walletData}
|
||||
isShowDropdowns={currentAccountUsername === selectedUsername}
|
||||
/>
|
||||
</CollapsibleCard>
|
||||
<Transaction walletData={walletData} />
|
||||
|
@ -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}
|
||||
/>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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')}
|
||||
/>
|
||||
|
Loading…
Reference in New Issue
Block a user