diff options
author | kumavis <kumavis@users.noreply.github.com> | 2018-03-30 07:52:52 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-30 07:52:52 +0800 |
commit | 9d4be1842e7c56e3bfde529ff555dcae8dec3dbd (patch) | |
tree | 6d52709412f407389b58ec15923fe0794f093dcf /ui/app/components/tx-view.js | |
parent | 5a0523cdfd50dcd4e5680134346ccfcb4bb7cbf4 (diff) | |
parent | 74f13c0a34494ab9c96db8772ea2b443ede0835b (diff) | |
download | tangerine-wallet-browser-9d4be1842e7c56e3bfde529ff555dcae8dec3dbd.tar tangerine-wallet-browser-9d4be1842e7c56e3bfde529ff555dcae8dec3dbd.tar.gz tangerine-wallet-browser-9d4be1842e7c56e3bfde529ff555dcae8dec3dbd.tar.bz2 tangerine-wallet-browser-9d4be1842e7c56e3bfde529ff555dcae8dec3dbd.tar.lz tangerine-wallet-browser-9d4be1842e7c56e3bfde529ff555dcae8dec3dbd.tar.xz tangerine-wallet-browser-9d4be1842e7c56e3bfde529ff555dcae8dec3dbd.tar.zst tangerine-wallet-browser-9d4be1842e7c56e3bfde529ff555dcae8dec3dbd.zip |
Merge pull request #3788 from danjm/i3787-make-t-available-via-context
i18n - Removes t from props via metamask-connect; put t on context
Diffstat (limited to 'ui/app/components/tx-view.js')
-rw-r--r-- | ui/app/components/tx-view.js | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/ui/app/components/tx-view.js b/ui/app/components/tx-view.js index 8b0cc890a..ca24e813f 100644 --- a/ui/app/components/tx-view.js +++ b/ui/app/components/tx-view.js @@ -1,5 +1,6 @@ const Component = require('react').Component -const connect = require('../metamask-connect') +const PropTypes = require('prop-types') +const connect = require('react-redux').connect const h = require('react-hyperscript') const ethUtil = require('ethereumjs-util') const inherits = require('util').inherits @@ -10,8 +11,13 @@ const BalanceComponent = require('./balance-component') const TxList = require('./tx-list') const Identicon = require('./identicon') +TxView.contextTypes = { + t: PropTypes.func, +} + module.exports = connect(mapStateToProps, mapDispatchToProps)(TxView) + function mapStateToProps (state) { const sidebarOpen = state.appState.sidebarOpen const isMascara = state.appState.isMascara @@ -72,21 +78,21 @@ TxView.prototype.renderButtons = function () { onClick: () => showModal({ name: 'DEPOSIT_ETHER', }), - }, this.props.t('deposit')), + }, this.context.t('deposit')), h('button.btn-primary.hero-balance-button', { style: { marginLeft: '0.8em', }, onClick: showSendPage, - }, this.props.t('send')), + }, this.context.t('send')), ]) ) : ( h('div.flex-row.flex-center.hero-balance-buttons', [ h('button.btn-primary.hero-balance-button', { onClick: showSendTokenPage, - }, this.props.t('send')), + }, this.context.t('send')), ]) ) } |