aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/sender-to-recipient.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/app/components/sender-to-recipient.js')
-rw-r--r--ui/app/components/sender-to-recipient.js14
1 files changed, 10 insertions, 4 deletions
diff --git a/ui/app/components/sender-to-recipient.js b/ui/app/components/sender-to-recipient.js
index f35c353ad..9cef8e401 100644
--- a/ui/app/components/sender-to-recipient.js
+++ b/ui/app/components/sender-to-recipient.js
@@ -1,7 +1,7 @@
const { Component } = require('react')
const h = require('react-hyperscript')
+const connect = require('react-redux').connect
const PropTypes = require('prop-types')
-const t = require('../../i18n')
const Identicon = require('./identicon')
class SenderToRecipient extends Component {
@@ -21,7 +21,7 @@ class SenderToRecipient extends Component {
this.renderRecipientIcon(),
h(
'.sender-to-recipient__name.sender-to-recipient__recipient-name',
- recipientName || t('newContract')
+ recipientName || this.context.t('newContract')
),
])
)
@@ -46,7 +46,7 @@ class SenderToRecipient extends Component {
h('img', {
height: 15,
width: 15,
- src: '/images/arrow-right.svg',
+ src: './images/arrow-right.svg',
}),
]),
]),
@@ -61,6 +61,12 @@ SenderToRecipient.propTypes = {
senderAddress: PropTypes.string,
recipientName: PropTypes.string,
recipientAddress: PropTypes.string,
+ t: PropTypes.func,
}
-module.exports = SenderToRecipient
+SenderToRecipient.contextTypes = {
+ t: PropTypes.func,
+}
+
+module.exports = connect()(SenderToRecipient)
+