Merge pull request #743 from embark-framework/feature/hide-alert-on-ipfs

Display alert only when not ipfs
This commit is contained in:
Iuri Matias 2018-08-24 15:52:29 -04:00 committed by GitHub
commit 7ef531aacc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -151,6 +151,10 @@ class Storage extends React.Component {
});
}
isIpfs(){
return EmbarkJS.Storage.currentProviderName === 'ipfs';
}
render() {
return <React.Fragment>
{
@ -215,7 +219,7 @@ class Storage extends React.Component {
</FormGroup>
</Form>
<Alert bsStyle="warning">The 2 functions below are only available with IPFS</Alert>
{!this.isIpfs() && <Alert bsStyle="warning">The 2 functions below are only available with IPFS</Alert>}
<h3>Register to IPNS</h3>
<Form inline onKeyDown={(e) => this.checkEnter(e, this.ipnsRegister)}>