aboutsummaryrefslogtreecommitdiffstats
path: root/old-ui
diff options
context:
space:
mode:
authorkumavis <kumavis@users.noreply.github.com>2018-03-01 03:00:12 +0800
committerGitHub <noreply@github.com>2018-03-01 03:00:12 +0800
commitb1faa1334499d244f2c0d08aa36962247a9c1e14 (patch)
tree37763db73ecad4770a26b7f160a54fc93850b38a /old-ui
parent40484b1c1ff2b8828d6764c1ba7bcf20730c4a30 (diff)
parentc4ef9630dae73d68cfc3191a182c03b840a33a0d (diff)
downloadtangerine-wallet-browser-b1faa1334499d244f2c0d08aa36962247a9c1e14.tar
tangerine-wallet-browser-b1faa1334499d244f2c0d08aa36962247a9c1e14.tar.gz
tangerine-wallet-browser-b1faa1334499d244f2c0d08aa36962247a9c1e14.tar.bz2
tangerine-wallet-browser-b1faa1334499d244f2c0d08aa36962247a9c1e14.tar.lz
tangerine-wallet-browser-b1faa1334499d244f2c0d08aa36962247a9c1e14.tar.xz
tangerine-wallet-browser-b1faa1334499d244f2c0d08aa36962247a9c1e14.tar.zst
tangerine-wallet-browser-b1faa1334499d244f2c0d08aa36962247a9c1e14.zip
Merge pull request #3350 from danjm/onclick-undefined-sentry-error
[old-ui] Prevent user from switching network in old-ui notification
Diffstat (limited to 'old-ui')
-rw-r--r--old-ui/app/components/network.js20
1 files changed, 11 insertions, 9 deletions
diff --git a/old-ui/app/components/network.js b/old-ui/app/components/network.js
index 0dbe37cdd..59596dabd 100644
--- a/old-ui/app/components/network.js
+++ b/old-ui/app/components/network.js
@@ -23,14 +23,15 @@ Network.prototype.render = function () {
if (networkNumber === 'loading') {
return h('span.pointer', {
+ className: props.onClick && 'pointer',
style: {
display: 'flex',
alignItems: 'center',
flexDirection: 'row',
},
- onClick: (event) => this.props.onClick(event),
+ onClick: (event) => props.onClick && props.onClick(event),
}, [
- h('img', {
+ props.onClick && h('img', {
title: 'Attempting to connect to blockchain.',
style: {
width: '27px',
@@ -60,9 +61,10 @@ Network.prototype.render = function () {
}
return (
- h('#network_component.pointer', {
+ h('#network_component', {
+ className: props.onClick && 'pointer',
title: hoverText,
- onClick: (event) => this.props.onClick(event),
+ onClick: (event) => props.onClick && props.onClick(event),
}, [
(function () {
switch (iconName) {
@@ -74,7 +76,7 @@ Network.prototype.render = function () {
color: '#039396',
}},
'Main Network'),
- h('i.fa.fa-caret-down.fa-lg'),
+ props.onClick && h('i.fa.fa-caret-down.fa-lg'),
])
case 'ropsten-test-network':
return h('.network-indicator', [
@@ -84,7 +86,7 @@ Network.prototype.render = function () {
color: '#ff6666',
}},
'Ropsten Test Net'),
- h('i.fa.fa-caret-down.fa-lg'),
+ props.onClick && h('i.fa.fa-caret-down.fa-lg'),
])
case 'kovan-test-network':
return h('.network-indicator', [
@@ -94,7 +96,7 @@ Network.prototype.render = function () {
color: '#690496',
}},
'Kovan Test Net'),
- h('i.fa.fa-caret-down.fa-lg'),
+ props.onClick && h('i.fa.fa-caret-down.fa-lg'),
])
case 'rinkeby-test-network':
return h('.network-indicator', [
@@ -104,7 +106,7 @@ Network.prototype.render = function () {
color: '#e7a218',
}},
'Rinkeby Test Net'),
- h('i.fa.fa-caret-down.fa-lg'),
+ props.onClick && h('i.fa.fa-caret-down.fa-lg'),
])
default:
return h('.network-indicator', [
@@ -120,7 +122,7 @@ Network.prototype.render = function () {
color: '#AEAEAE',
}},
'Private Network'),
- h('i.fa.fa-caret-down.fa-lg'),
+ props.onClick && h('i.fa.fa-caret-down.fa-lg'),
])
}
})(),