Hide deployment section in UI for fiddle contracts

This commit is contained in:
emizzle 2018-08-27 13:34:35 +10:00 committed by Pascal Precht
parent b8b98cd6c4
commit e027ae258a
No known key found for this signature in database
GPG Key ID: 0EE28D8D6FD85D7D
2 changed files with 14 additions and 10 deletions

View File

@ -14,7 +14,7 @@ import ContractDeploymentContainer from '../containers/ContractDeploymentContain
import ContractProfileContainer from '../containers/ContractProfileContainer';
import ContractSourceContainer from '../containers/ContractSourceContainer';
const ContractLayout = ({match}) => (
const ContractLayout = ({match, contract}) => (
<Grid.Row>
<Grid.Col md={3}>
<Page.Title className="my-5">&nbsp;</Page.Title>
@ -28,14 +28,18 @@ const ContractLayout = ({match}) => (
>
Overview
</List.GroupItem>
<List.GroupItem
className="d-flex align-items-center"
to={`/embark/contracts/${match.params.contractName}/deployment`}
icon="users"
RootComponent={NavLink}
>
Deployment / Utils
</List.GroupItem>
{!contract.isFiddle ?
<List.GroupItem
className="d-flex align-items-center"
to={`/embark/contracts/${match.params.contractName}/deployment`}
icon="users"
RootComponent={NavLink}
>
Deployment / Utils
</List.GroupItem>
:
''
}
<List.GroupItem
className="d-flex align-items-center"
to={`/embark/contracts/${match.params.contractName}/functions`}

View File

@ -14,7 +14,7 @@ class ContractLayoutContainer extends Component {
render() {
if (this.props.contract){
return <ContractLayout />;
return <ContractLayout contract={this.props.contract} />;
} else {
return <React.Fragment />;
}