mirror of https://github.com/embarklabs/embark.git
Adding blockchain indicator
This commit is contained in:
parent
8c3ac34fac
commit
0884cd7c8e
|
@ -21,12 +21,14 @@ class App extends React.Component {
|
||||||
error: null,
|
error: null,
|
||||||
activeKey: 1,
|
activeKey: 1,
|
||||||
whisperEnabled: false,
|
whisperEnabled: false,
|
||||||
storageEnabled: false
|
storageEnabled: false,
|
||||||
|
blockchainEnabled: false
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
EmbarkJS.onReady((err) => {
|
EmbarkJS.onReady((err) => {
|
||||||
|
this.setState({blockchainEnabled: true});
|
||||||
if (err) {
|
if (err) {
|
||||||
// If err is not null then it means something went wrong connecting to ethereum
|
// If err is not null then it means something went wrong connecting to ethereum
|
||||||
// you can use this to ask the user to enable metamask for e.g
|
// you can use this to ask the user to enable metamask for e.g
|
||||||
|
@ -81,7 +83,7 @@ class App extends React.Component {
|
||||||
return (<div>
|
return (<div>
|
||||||
<h3>Embark - Usage Example</h3>
|
<h3>Embark - Usage Example</h3>
|
||||||
<Tabs onSelect={this.handleSelect} activeKey={this.state.activeKey} id="uncontrolled-tab-example">
|
<Tabs onSelect={this.handleSelect} activeKey={this.state.activeKey} id="uncontrolled-tab-example">
|
||||||
<Tab eventKey={1} title="Blockchain">
|
<Tab eventKey={1} title={this._renderStatus('Blockchain', this.state.blockchainEnabled)}>
|
||||||
<Blockchain/>
|
<Blockchain/>
|
||||||
</Tab>
|
</Tab>
|
||||||
<Tab eventKey={2} title={this._renderStatus('Decentralized Storage', this.state.storageEnabled)}>
|
<Tab eventKey={2} title={this._renderStatus('Decentralized Storage', this.state.storageEnabled)}>
|
||||||
|
|
Loading…
Reference in New Issue