aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/network.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/app/components/network.js')
-rw-r--r--ui/app/components/network.js28
1 files changed, 16 insertions, 12 deletions
diff --git a/ui/app/components/network.js b/ui/app/components/network.js
index dbba2b494..5f507f630 100644
--- a/ui/app/components/network.js
+++ b/ui/app/components/network.js
@@ -11,24 +11,28 @@ function Network() {
}
Network.prototype.render = function() {
- var state = this.props
- var networkNumber = state.network
- var networkName;
- var imagePath = "/images/"
+ const state = this.props
+ const networkNumber = state.network
+ let iconName, hoverText
+ const imagePath = "/images/"
if (networkNumber == undefined || networkNumber == "error") {
- networkName = "No Blockchain Connection"
+ hoverText = 'No Blockchain Connection'
+ iconName = 'no-connection'
} else if (networkNumber == 1) {
- networkName = "Main Ethereum Network"
- } else if (networkNumber == 2) {
- networkName = "Morden Test Network"
- } else {
- networkName = "Unknown Private Network"
+ hoverText = 'Main Ethereum Network'
+ iconName = 'ethereum-network'
+ }else if (networkNumber == 2) {
+ hoverText = "Morden Test Network"
+ iconName = 'morden-test-network'
+ }else {
+ hoverText = "Unknown Private Network"
+ iconName = 'unknown-private-network'
}
return (
h('#network_component.flex-center', {
style: {},
- title: networkName
- },[ h('img',{src: imagePath + networkName + ".jpg", width: '25px'}) ])
+ title: hoverText,
+ },[ h('img',{src: imagePath + iconName + ".jpg", width: '25px'}) ])
)
}