mirror of https://github.com/embarklabs/embark.git
Hide deployment section in UI for fiddle contracts
This commit is contained in:
parent
b8b98cd6c4
commit
e027ae258a
|
@ -14,7 +14,7 @@ import ContractDeploymentContainer from '../containers/ContractDeploymentContain
|
||||||
import ContractProfileContainer from '../containers/ContractProfileContainer';
|
import ContractProfileContainer from '../containers/ContractProfileContainer';
|
||||||
import ContractSourceContainer from '../containers/ContractSourceContainer';
|
import ContractSourceContainer from '../containers/ContractSourceContainer';
|
||||||
|
|
||||||
const ContractLayout = ({match}) => (
|
const ContractLayout = ({match, contract}) => (
|
||||||
<Grid.Row>
|
<Grid.Row>
|
||||||
<Grid.Col md={3}>
|
<Grid.Col md={3}>
|
||||||
<Page.Title className="my-5"> </Page.Title>
|
<Page.Title className="my-5"> </Page.Title>
|
||||||
|
@ -28,14 +28,18 @@ const ContractLayout = ({match}) => (
|
||||||
>
|
>
|
||||||
Overview
|
Overview
|
||||||
</List.GroupItem>
|
</List.GroupItem>
|
||||||
<List.GroupItem
|
{!contract.isFiddle ?
|
||||||
className="d-flex align-items-center"
|
<List.GroupItem
|
||||||
to={`/embark/contracts/${match.params.contractName}/deployment`}
|
className="d-flex align-items-center"
|
||||||
icon="users"
|
to={`/embark/contracts/${match.params.contractName}/deployment`}
|
||||||
RootComponent={NavLink}
|
icon="users"
|
||||||
>
|
RootComponent={NavLink}
|
||||||
Deployment / Utils
|
>
|
||||||
</List.GroupItem>
|
Deployment / Utils
|
||||||
|
</List.GroupItem>
|
||||||
|
:
|
||||||
|
''
|
||||||
|
}
|
||||||
<List.GroupItem
|
<List.GroupItem
|
||||||
className="d-flex align-items-center"
|
className="d-flex align-items-center"
|
||||||
to={`/embark/contracts/${match.params.contractName}/functions`}
|
to={`/embark/contracts/${match.params.contractName}/functions`}
|
||||||
|
|
|
@ -14,7 +14,7 @@ class ContractLayoutContainer extends Component {
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
if (this.props.contract){
|
if (this.props.contract){
|
||||||
return <ContractLayout />;
|
return <ContractLayout contract={this.props.contract} />;
|
||||||
} else {
|
} else {
|
||||||
return <React.Fragment />;
|
return <React.Fragment />;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue