ens-usernames/app/components/ensSubManagement.js

32 lines
934 B
JavaScript
Raw Normal View History

import EmbarkJS from 'Embark/EmbarkJS';
2018-05-23 18:45:29 +00:00
import ENSRegistry from 'Embark/contracts/ENSRegistry';
import React, { Fragment } from 'react';
import { Form, FormGroup, FormControl, HelpBlock, Button, ControlLabel } from 'react-bootstrap';
2018-05-22 19:44:33 +00:00
import AddDomain from './ens/addDomain'
2018-05-23 18:45:29 +00:00
import SetupENS from './ens/setupENS'
const FieldGroup = ({ id, label, help, ...props }) => (
<FormGroup controlId={id}>
<ControlLabel>{label}</ControlLabel>
<FormControl {...props} />
{help && <HelpBlock>{help}</HelpBlock>}
</FormGroup>
)
const ENSSubManagement = (props) => (
<Fragment>
2018-05-22 20:40:56 +00:00
<h2 style={{textAlign: 'center'}}>Subdomain Management</h2>
2018-05-22 16:33:20 +00:00
<h3>Add Domain</h3>
2018-05-22 19:44:33 +00:00
<AddDomain />
2018-05-23 18:45:29 +00:00
<hr/>
<SetupENS ENSRegistry={ENSRegistry} />
</Fragment>
)
2018-05-23 18:45:29 +00:00
//console.log(ENSRegistry);
setTimeout(() => ENSRegistry.getPastEvents(
'allEvents',
{},
(err, res) => { console.log(err, res) }), 2000)
export default ENSSubManagement