mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-22 21:01:31 +03:00
New container design
This commit is contained in:
parent
790abbe0cf
commit
bce3778a0e
@ -140,24 +140,25 @@ class TransferContainer extends Component {
|
|||||||
};
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { accounts, currentAccount, navigation } = this.props;
|
const { accounts, currentAccount, navigation, children } = this.props;
|
||||||
const { balance, fundType } = this.state;
|
const { balance, fundType } = this.state;
|
||||||
|
|
||||||
const transferType = navigation.getParam('transferType', '');
|
const transferType = navigation.getParam('transferType', '');
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<TransferView
|
children &&
|
||||||
accounts={accounts}
|
children({
|
||||||
fetchBalance={this.fetchBalance}
|
accounts,
|
||||||
getAccountsWithUsername={this._getAccountsWithUsername}
|
balance,
|
||||||
transferToAccount={this._transferToAccount}
|
fundType,
|
||||||
handleOnModalClose={this._handleOnModalClose}
|
transferType,
|
||||||
accountType={currentAccount.local.authType}
|
fetchBalance: this.fetchBalance,
|
||||||
currentAccountName={currentAccount.name}
|
getAccountsWithUsername: this._getAccountsWithUsername,
|
||||||
balance={balance}
|
transferToAccount: this._transferToAccount,
|
||||||
fundType={fundType}
|
handleOnModalClose: this._handleOnModalClose,
|
||||||
transferType={transferType}
|
accountType: currentAccount.local.authType,
|
||||||
/>
|
currentAccountName: currentAccount.name,
|
||||||
|
})
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,45 @@
|
|||||||
import TransferScreen from './screen/transferScreen';
|
import React from 'react';
|
||||||
import Transfer from './container/transferContainer';
|
|
||||||
|
import TransferContainer from './container/transferContainer';
|
||||||
|
|
||||||
|
import TransferScreen from './screen/transferScreen';
|
||||||
|
|
||||||
|
const Transfer = ({ navigation }) => (
|
||||||
|
<TransferContainer navigation={navigation}>
|
||||||
|
{({
|
||||||
|
accounts,
|
||||||
|
balance,
|
||||||
|
fundType,
|
||||||
|
transferType,
|
||||||
|
fetchBalance,
|
||||||
|
getAccountsWithUsername,
|
||||||
|
transferToAccount,
|
||||||
|
handleOnModalClose,
|
||||||
|
accountType,
|
||||||
|
currentAccountName,
|
||||||
|
}) => {
|
||||||
|
switch (transferType) {
|
||||||
|
case 'transfer_token':
|
||||||
|
return (
|
||||||
|
<TransferScreen
|
||||||
|
accounts={accounts}
|
||||||
|
balance={balance}
|
||||||
|
fundType={fundType}
|
||||||
|
transferType={transferType}
|
||||||
|
fetchBalance={fetchBalance}
|
||||||
|
getAccountsWithUsername={getAccountsWithUsername}
|
||||||
|
transferToAccount={transferToAccount}
|
||||||
|
handleOnModalClose={handleOnModalClose}
|
||||||
|
accountType={accountType}
|
||||||
|
currentAccountName={currentAccountName}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
|
||||||
|
default:
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
</TransferContainer>
|
||||||
|
);
|
||||||
|
|
||||||
export { TransferScreen, Transfer };
|
|
||||||
export default Transfer;
|
export default Transfer;
|
||||||
|
Loading…
Reference in New Issue
Block a user