2018-11-28 16:12:50 +00:00
|
|
|
import React from 'react';
|
|
|
|
import EmbarkJS from 'Embark/EmbarkJS';
|
|
|
|
import web3 from "Embark/web3";
|
|
|
|
|
|
|
|
const { getNetworkType } = web3.eth.net;
|
|
|
|
|
|
|
|
class App extends React.Component {
|
|
|
|
constructor(props) {
|
|
|
|
super(props)
|
|
|
|
}
|
|
|
|
state = { admin: false };
|
|
|
|
|
|
|
|
componentDidMount(){
|
|
|
|
EmbarkJS.onReady((err) => {
|
|
|
|
getNetworkType().then(network => {
|
|
|
|
const { environment } = EmbarkJS
|
|
|
|
this.setState({ network, environment })
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
render() {
|
|
|
|
return (
|
2018-11-28 16:41:29 +00:00
|
|
|
<div>
|
|
|
|
<div>Hello world!</div>
|
|
|
|
</div>
|
2018-11-28 16:12:50 +00:00
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
2018-11-28 16:41:29 +00:00
|
|
|
|
|
|
|
|
|
|
|
export default App;
|