add field label to mobile search

This commit is contained in:
Barry Gitarts 2018-07-11 14:44:32 -04:00
parent 93f70a30b0
commit 0abd4844f4
2 changed files with 25 additions and 20 deletions

View File

@ -94,8 +94,8 @@ const RegisterInfoCard = ({ formattedDomain, domainPrice }) => (
</Info> </Info>
</Hidden> </Hidden>
<Hidden mdUp> <Hidden mdUp>
<Typography style={{ textAlign: 'center', padding: '1.5em', color: '#939ba1' }}> <Typography style={{ textAlign: 'center', padding: '1.5em' }}>
Resolve this domain to your Status wallet address and contact code This name will be pointed to the wallet address and contact code below
</Typography> </Typography>
</Hidden> </Hidden>
</Fragment> </Fragment>

View File

@ -2,7 +2,7 @@ import web3 from "Embark/web3"
import ENSSubdomainRegistry from 'Embark/contracts/ENSSubdomainRegistry'; import ENSSubdomainRegistry from 'Embark/contracts/ENSSubdomainRegistry';
import React from 'react'; import React from 'react';
import Hidden from '@material-ui/core/Hidden'; import Hidden from '@material-ui/core/Hidden';
import { Button, MobileSearch, MobileButton } from '../../ui/components'; import { Button, MobileSearch, MobileButton, Field } from '../../ui/components';
import { withFormik } from 'formik'; import { withFormik } from 'formik';
import { hash } from 'eth-ens-namehash'; import { hash } from 'eth-ens-namehash';
import { zeroAddress, zeroBytes32, formatPrice } from './utils'; import { zeroAddress, zeroBytes32, formatPrice } from './utils';
@ -48,7 +48,7 @@ const InnerForm = ({
button={ button={
<Button <Button
mode="strong" mode="strong"
style={{ marginTop: '5px' }} style={{ marginTop: '5px' }}
onClick={() => { onClick={() => {
ENSSubdomainRegistry.methods.getPrice(hash(values.domainName)) ENSSubdomainRegistry.methods.getPrice(hash(values.domainName))
.call() .call()
@ -92,22 +92,27 @@ const InnerForm = ({
{!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 />} {!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 />}
</Hidden> </Hidden>
<Hidden mdUp> <Hidden mdUp>
<MobileSearch <Field label="Your Contact Code">
name="statusAddress" <MobileSearch
style={{ marginTop: '10px' }} name="statusAddress"
placeholder="Status Messenger Address" style={{ marginTop: '10px' }}
value={values.statusAddress} placeholder="Status Messenger Address"
onChange={handleChange} label="test"
wide /> value={values.statusAddress}
<MobileSearch onChange={handleChange}
name="address" wide />
style={{ marginTop: '10px' }} </Field>
placeholder="Ethereum Address" <Field label="Your Wallet Address">
value={values.address} <MobileSearch
onChange={handleChange} name="address"
paste={() => setFieldValue('address', web3.eth.defaultAccount)} style={{ marginTop: '10px' }}
required placeholder="Ethereum Address"
wide /> value={values.address}
onChange={handleChange}
paste={() => setFieldValue('address', web3.eth.defaultAccount)}
required
wide />
</Field>
<div style={{ margin: '10% 0 0 20%' }}> <div style={{ margin: '10% 0 0 20%' }}>
<MobileButton type="submit" text="Pay & register" /> <MobileButton type="submit" text="Pay & register" />
</div> </div>