Fix for empty display boxes

This commit is contained in:
Aleksandr Pantiukhov 2018-10-25 17:03:03 +02:00 committed by Barry G
parent e926060712
commit 6ea9b5caee
2 changed files with 4 additions and 4 deletions

View File

@ -28,7 +28,7 @@ const BlueBox = styled.div`
color: #4360df;
`;
const DisplayBox = ({ displayType, pubKey, onClick, showBlueBox }) => (
const DisplayBox = ({ displayType, text, onClick, showBlueBox }) => (
<div>
<DisplayLabel>
{displayType}
@ -42,7 +42,7 @@ const DisplayBox = ({ displayType, pubKey, onClick, showBlueBox }) => (
</BlueBox>
:
<Typography type='body1'>
{pubKey}
{text}
</Typography>
}
</InnerDisplayBox>

View File

@ -103,8 +103,8 @@ const MobileAddressDisplay = ({ domainName, address, statusAccount, expirationTi
editAccount={true}
preRegisteredCallback={onSubmit}
registeredCallbackFn={console.log} />}
{!edit && <DisplayBox displayType='Your wallet address' pubKey={address} />}
{!edit && validStatusAddress(statusAccount) && <DisplayBox displayType={YOUR_CONTACT_CODE} pubKey={statusAccount} />}
{!edit && <DisplayBox displayType='Your wallet address' text={address} />}
{!edit && validStatusAddress(statusAccount) && <DisplayBox displayType={YOUR_CONTACT_CODE} text={statusAccount} />}
</Fragment>
)