ens-usernames/app/components/ensSubManagement.js

39 lines
1.2 KiB
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 ENSSubdomainRegistry from 'Embark/contracts/ENSSubdomainRegistry';
import TestToken from 'Embark/contracts/TestToken';
import React, { Fragment } from 'react';
import { Form, FormGroup, FormControl, HelpBlock, Button, ControlLabel } from 'react-bootstrap';
2018-05-27 20:28:07 +00:00
import AddDomain from './ens/addDomain';
import RegisterSubDomain from './ens/registerSubDomain';
import TokenPermissions from './standard/TokenPermission';
2018-05-27 20:28:07 +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-27 20:28:07 +00:00
<h3>Add/Update Domain Price</h3>
2018-05-22 19:44:33 +00:00
<AddDomain />
2018-05-23 18:45:29 +00:00
<hr/>
2018-05-27 20:28:07 +00:00
<h3>Register Sub-Domain</h3>
<RegisterSubDomain />
<hr/>
<TokenPermissions
symbol='SNT'
spender={ENSSubdomainRegistry._address}
methods={TestToken.methods} />
<hr/>
2018-05-23 18:45:29 +00:00
<SetupENS ENSRegistry={ENSRegistry} />
</Fragment>
)
2018-05-27 20:28:07 +00:00
export default ENSSubManagement;