add linear progress when registering
This commit is contained in:
parent
0c0996fe59
commit
f4ed8f7c4b
|
@ -6,6 +6,7 @@ import { withFormik } from 'formik';
|
||||||
import { hash } from 'eth-ens-namehash';
|
import { hash } from 'eth-ens-namehash';
|
||||||
import { zeroAddress, zeroBytes32 } from './utils';
|
import { zeroAddress, zeroBytes32 } from './utils';
|
||||||
import FieldGroup from '../standard/FieldGroup';
|
import FieldGroup from '../standard/FieldGroup';
|
||||||
|
import LinearProgress from '@material-ui/core/LinearProgress';
|
||||||
|
|
||||||
const { soliditySha3 } = web3.utils;
|
const { soliditySha3 } = web3.utils;
|
||||||
|
|
||||||
|
@ -23,7 +24,8 @@ const InnerForm = ({
|
||||||
domainPrice,
|
domainPrice,
|
||||||
}) => (
|
}) => (
|
||||||
<form onSubmit={handleSubmit}>
|
<form onSubmit={handleSubmit}>
|
||||||
{!subDomain && <FieldGroup
|
{!subDomain &&
|
||||||
|
<FieldGroup
|
||||||
id="subDomain"
|
id="subDomain"
|
||||||
name="subDomain"
|
name="subDomain"
|
||||||
type="text"
|
type="text"
|
||||||
|
@ -33,7 +35,8 @@ const InnerForm = ({
|
||||||
value={values.subDomain}
|
value={values.subDomain}
|
||||||
error={errors.subDomain}
|
error={errors.subDomain}
|
||||||
/>}
|
/>}
|
||||||
{!domainName && <FieldGroup
|
{!domainName &&
|
||||||
|
<FieldGroup
|
||||||
id="domainName"
|
id="domainName"
|
||||||
name="domainName"
|
name="domainName"
|
||||||
type="text"
|
type="text"
|
||||||
|
@ -55,7 +58,8 @@ const InnerForm = ({
|
||||||
</Button>
|
</Button>
|
||||||
}
|
}
|
||||||
/>}
|
/>}
|
||||||
{!domainPrice && <FieldGroup
|
{!domainPrice &&
|
||||||
|
<FieldGroup
|
||||||
id="price"
|
id="price"
|
||||||
name="price"
|
name="price"
|
||||||
label="Domain Price"
|
label="Domain Price"
|
||||||
|
@ -83,7 +87,7 @@ const InnerForm = ({
|
||||||
error={errors.address}
|
error={errors.address}
|
||||||
button={<Button mode="strong" style={{ padding: '5px 15px 5px 15px', marginTop: '5px' }} onClick={() => setFieldValue('address', web3.eth.defaultAccount)}>Use My Primary Address</Button>}
|
button={<Button mode="strong" style={{ padding: '5px 15px 5px 15px', marginTop: '5px' }} onClick={() => setFieldValue('address', web3.eth.defaultAccount)}>Use My Primary Address</Button>}
|
||||||
/>
|
/>
|
||||||
<Button wide mode="strong" type="submit" disabled={isSubmitting || !!Object.keys(errors).length}>{!isSubmitting ? 'Submit' : 'Submitting to the Blockchain - (this may take awhile)'}</Button>
|
{!isSubmitting ? <Button wide mode="strong" type="submit" disabled={isSubmitting || !!Object.keys(errors).length}>{!isSubmitting ? 'Submit' : 'Submitting to the Blockchain - (this may take awhile)'}</Button> : <LinearProgress />}
|
||||||
</form>
|
</form>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue