aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/copyButton.js
diff options
context:
space:
mode:
authorDan <danjm.com@gmail.com>2018-03-30 10:30:31 +0800
committerDan <danjm.com@gmail.com>2018-03-30 10:30:31 +0800
commit717623e2e388f488d71bd6e19095645cd8095a99 (patch)
tree7c16960c017585e2823c927199c4b98b93aecbbd /ui/app/components/copyButton.js
parent01e3293b65bb153325479f7366113e037fee659b (diff)
parent9d4be1842e7c56e3bfde529ff555dcae8dec3dbd (diff)
downloadtangerine-wallet-browser-717623e2e388f488d71bd6e19095645cd8095a99.tar
tangerine-wallet-browser-717623e2e388f488d71bd6e19095645cd8095a99.tar.gz
tangerine-wallet-browser-717623e2e388f488d71bd6e19095645cd8095a99.tar.bz2
tangerine-wallet-browser-717623e2e388f488d71bd6e19095645cd8095a99.tar.lz
tangerine-wallet-browser-717623e2e388f488d71bd6e19095645cd8095a99.tar.xz
tangerine-wallet-browser-717623e2e388f488d71bd6e19095645cd8095a99.tar.zst
tangerine-wallet-browser-717623e2e388f488d71bd6e19095645cd8095a99.zip
Merge branch 'master' into i3686-txparamundefined-sigrequestsintxlist
Diffstat (limited to 'ui/app/components/copyButton.js')
-rw-r--r--ui/app/components/copyButton.js10
1 files changed, 8 insertions, 2 deletions
diff --git a/ui/app/components/copyButton.js b/ui/app/components/copyButton.js
index ea1c43d54..a60d33523 100644
--- a/ui/app/components/copyButton.js
+++ b/ui/app/components/copyButton.js
@@ -1,13 +1,19 @@
const Component = require('react').Component
+const PropTypes = require('prop-types')
const h = require('react-hyperscript')
const inherits = require('util').inherits
const copyToClipboard = require('copy-to-clipboard')
-const connect = require('../metamask-connect')
+const connect = require('react-redux').connect
const Tooltip = require('./tooltip')
+CopyButton.contextTypes = {
+ t: PropTypes.func,
+}
+
module.exports = connect()(CopyButton)
+
inherits(CopyButton, Component)
function CopyButton () {
Component.call(this)
@@ -23,7 +29,7 @@ CopyButton.prototype.render = function () {
const value = props.value
const copied = state.copied
- const message = copied ? this.props.t('copiedButton') : props.title || this.props.t('copyButton')
+ const message = copied ? this.context.t('copiedButton') : props.title || this.context.t('copyButton')
return h('.copy-button', {
style: {