on master help sign in
Make 'loading' flag a function of networkType.
0c1b6f9Jared Tobin
src/bridge/views/Points.js+6−1
@@ -4,6 +4,7 @@ import { Button } from '../components/Base'
4import * as azimuth from 'azimuth-js'
4import * as azimuth from 'azimuth-js'
5
5
6import PointList from '../components/PointList'
6import PointList from '../components/PointList'
7+import { NETWORK_NAMES } from '../lib/network'
7import { ROUTE_NAMES } from '../lib/router'
8import { ROUTE_NAMES } from '../lib/router'
8import {
9import {
9 ETH_ZERO_ADDR,
10 ETH_ZERO_ADDR,
@@ -21,6 +22,9 @@ class Points extends React.Component {
21 constructor(props) {
22 constructor(props) {
22 super(props)
23 super(props)
23
24
25+ const { networkType } = props
26+ const loading = networkType !== NETWORK_NAMES.OFFLINE
27+
24 this.state = {
28 this.state = {
25 points: [],
29 points: [],
26 incoming: [],
30 incoming: [],
@@ -28,7 +32,7 @@ class Points extends React.Component {
28 voting: [],
32 voting: [],
29 spawning: [],
33 spawning: [],
30 eclipticOwner: false,
34 eclipticOwner: false,
31− loading: true
35+ loading: loading
32 }
36 }
33 }
37 }
34
38
@@ -73,6 +77,7 @@ class Points extends React.Component {
73
77
74 this.cachePoints(ctrcs, addToPointCache, points)
78 this.cachePoints(ctrcs, addToPointCache, points)
75 })))
79 })))
80+
76 }
81 }
77
82
78 cachePoints(contracts, addToPointCache, points) {
83 cachePoints(contracts, addToPointCache, points) {