2018-05-13 04:31:01 +00:00
|
|
|
import React from 'react';
|
|
|
|
import ReactDOM from 'react-dom';
|
|
|
|
import { Tabs, Tab } from 'react-bootstrap';
|
|
|
|
|
|
|
|
import EmbarkJS from 'Embark/EmbarkJS';
|
2018-05-17 19:53:23 +00:00
|
|
|
import TopNavbar from './components/topnavbar';
|
2018-05-13 04:31:01 +00:00
|
|
|
import TestTokenUI from './components/testtoken';
|
2018-05-17 15:04:47 +00:00
|
|
|
import ERC20TokenUI from './components/erc20token';
|
|
|
|
import ENSSubdomainRegistryUI from './components/enssubdomainregistry';
|
2018-05-22 14:31:27 +00:00
|
|
|
import ENSSubManagement from './components/ensSubManagement'
|
2018-05-13 04:31:01 +00:00
|
|
|
|
|
|
|
import './dapp.css';
|
|
|
|
|
|
|
|
class App extends React.Component {
|
|
|
|
|
|
|
|
constructor(props) {
|
|
|
|
super(props);
|
|
|
|
}
|
|
|
|
|
2018-05-22 14:31:27 +00:00
|
|
|
componentDidMount(){
|
2018-05-13 04:31:01 +00:00
|
|
|
__embarkContext.execWhenReady(() => {
|
2018-05-22 14:31:27 +00:00
|
|
|
|
2018-05-13 04:31:01 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2018-05-17 19:53:23 +00:00
|
|
|
_renderStatus(title, available) {
|
2018-05-13 04:31:01 +00:00
|
|
|
let className = available ? 'pull-right status-online' : 'pull-right status-offline';
|
|
|
|
return <React.Fragment>
|
2018-05-22 14:31:27 +00:00
|
|
|
{title}
|
2018-05-13 04:31:01 +00:00
|
|
|
<span className={className}></span>
|
|
|
|
</React.Fragment>;
|
|
|
|
}
|
|
|
|
|
|
|
|
render(){
|
2018-05-17 15:04:47 +00:00
|
|
|
return (<div><h3>Status.im Contracts</h3>
|
|
|
|
<Tabs defaultActiveKey={1} id="uncontrolled-tab-example">
|
2018-05-22 14:31:27 +00:00
|
|
|
<Tab eventKey={1} title="TestToken">
|
2018-05-17 15:04:47 +00:00
|
|
|
<TestTokenUI />
|
2018-05-22 14:31:27 +00:00
|
|
|
</Tab>
|
|
|
|
<Tab eventKey={2} title="ERC20Token">
|
2018-05-17 15:04:47 +00:00
|
|
|
<ERC20TokenUI />
|
2018-05-22 14:31:27 +00:00
|
|
|
</Tab>
|
|
|
|
<Tab eventKey={3} title="ENSSubdomainRegistry">
|
2018-05-17 15:04:47 +00:00
|
|
|
<ENSSubdomainRegistryUI />
|
2018-05-22 14:31:27 +00:00
|
|
|
</Tab>
|
|
|
|
<Tab eventKey={4} title="ENS Management">
|
|
|
|
<ENSSubManagement />
|
|
|
|
</Tab>
|
2018-05-17 15:04:47 +00:00
|
|
|
</Tabs>
|
|
|
|
</div>);
|
2018-05-13 04:31:01 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-06-01 14:25:59 +00:00
|
|
|
export default App;
|