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

View File

@ -151,6 +151,10 @@ class Storage extends React.Component {
}); });
} }
isIpfs(){
return EmbarkJS.Storage.currentProviderName === 'ipfs';
}
render() { render() {
return <React.Fragment> return <React.Fragment>
{ {
@ -215,7 +219,7 @@ class Storage extends React.Component {
</FormGroup> </FormGroup>
</Form> </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> <h3>Register to IPNS</h3>
<Form inline onKeyDown={(e) => this.checkEnter(e, this.ipnsRegister)}> <Form inline onKeyDown={(e) => this.checkEnter(e, this.ipnsRegister)}>