add lookup to ownership page

This commit is contained in:
Barry Gitarts 2018-09-28 14:20:58 -04:00 committed by Barry G
parent 15f636f4b1
commit b1e6242972
1 changed files with 40 additions and 46 deletions

View File

@ -75,16 +75,9 @@ const DisplayBox = ({ displayType, pubKey }) => (
</div>
);
const MobileAddressDisplay = ({ domainName, address, statusAccount, releaseTime, defaultAccount, isOwner, edit, onSubmit }) => (
const MobileAddressDisplay = ({ domainName, address, statusAccount, releaseTime, defaultAccount, isOwner, edit, onSubmit, handleChange, values, handleSubmit }) => (
<Fragment>
<MobileSearch
search
name="domainName"
placeholder='Search for available name'
// value={values.domainName}
// onChange={handleChange}
required
wide />
<LookupForm {...{ handleSubmit, values, handleChange }} justSearch />
<Info background={isOwner ? '#44D058' : '#000000'} style={{ margin: '0.4em', boxShadow: '0px 6px 10px rgba(0, 0, 0, 0.2)' }}>
<Typography variant="title" style={
{ display: 'flex', flexDirection: 'column', alignItems: 'center', justifyContent: 'space-evenly', height: '4em', color: '#ffffff', textAlign: 'center', margin: '10%' }
@ -93,7 +86,7 @@ const MobileAddressDisplay = ({ domainName, address, statusAccount, releaseTime,
<b>{formatName(domainName)}</b>
<div style={{ fontWeight: 300 }}>
{validTimestamp(releaseTime) && <i>Locked until {generatePrettyDate(releaseTime)}</i>}
</div>
</div>
</Typography>
</Info>
<Typography type='subheading' style={{ textAlign: 'center', fontSize: '17px', fontWeight: '500', margin: '1.5em 0 0.3em 0' }}>
@ -114,7 +107,7 @@ const MobileAddressDisplay = ({ domainName, address, statusAccount, releaseTime,
{!edit && <DisplayBox displayType='Your wallet address' pubKey={address} />}
{!edit && validStatusAddress(statusAccount) && <DisplayBox displayType='Your contact code' pubKey={statusAccount} />}
</Fragment>
)
)
class RenderAddresses extends PureComponent {
state = { copied: false, editMenu: false, editAction: false }
@ -340,6 +333,7 @@ const InnerForm = ({
? <LookupForm {...{ handleSubmit, values, handleChange }} />
: validAddress(status.address) || defaultAccount === status.ownerAddress ?
<DisplayAddress
{...{ handleSubmit, values, handleChange }}
domainName={values.domainName}
address={status.address}
statusAccount={status.statusAccount}