aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/copyButton.js
diff options
context:
space:
mode:
authornyatla <nyatla39@gmail.com>2018-04-10 16:14:28 +0800
committernyatla <nyatla39@gmail.com>2018-04-10 16:14:28 +0800
commitcc246528b509b80e560715f3b315acf0764e99e7 (patch)
treea04cc12e6c11345bf751726f15fa9d3dd6be4733 /ui/app/components/copyButton.js
parentbc0487006c623f1c81c186ba5b2a7137efb940ec (diff)
parentb91bd818c7c2aec2952036a2f69ab05e0690a06e (diff)
downloadtangerine-wallet-browser-cc246528b509b80e560715f3b315acf0764e99e7.tar
tangerine-wallet-browser-cc246528b509b80e560715f3b315acf0764e99e7.tar.gz
tangerine-wallet-browser-cc246528b509b80e560715f3b315acf0764e99e7.tar.bz2
tangerine-wallet-browser-cc246528b509b80e560715f3b315acf0764e99e7.tar.lz
tangerine-wallet-browser-cc246528b509b80e560715f3b315acf0764e99e7.tar.xz
tangerine-wallet-browser-cc246528b509b80e560715f3b315acf0764e99e7.tar.zst
tangerine-wallet-browser-cc246528b509b80e560715f3b315acf0764e99e7.zip
Merge tag 'v4.5.5'
# Conflicts: # app/_locales/ja/messages.json # package-lock.json messages.jsonのローカライズ
Diffstat (limited to 'ui/app/components/copyButton.js')
-rw-r--r--ui/app/components/copyButton.js12
1 files changed, 9 insertions, 3 deletions
diff --git a/ui/app/components/copyButton.js b/ui/app/components/copyButton.js
index 355f78d45..a60d33523 100644
--- a/ui/app/components/copyButton.js
+++ b/ui/app/components/copyButton.js
@@ -1,12 +1,18 @@
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 t = require('../../i18n')
+const connect = require('react-redux').connect
const Tooltip = require('./tooltip')
-module.exports = CopyButton
+CopyButton.contextTypes = {
+ t: PropTypes.func,
+}
+
+module.exports = connect()(CopyButton)
+
inherits(CopyButton, Component)
function CopyButton () {
@@ -23,7 +29,7 @@ CopyButton.prototype.render = function () {
const value = props.value
const copied = state.copied
- const message = copied ? t('copiedButton') : props.title || t('copyButton')
+ const message = copied ? this.context.t('copiedButton') : props.title || this.context.t('copyButton')
return h('.copy-button', {
style: {