Hide Orch info if selected address is not an O

This commit is contained in:
Marco van Dijk 2022-03-03 22:37:38 +01:00
parent 019f8ddb3b
commit a36125a842
2 changed files with 61 additions and 49 deletions

View File

@ -122,7 +122,7 @@ class Livepeer extends React.Component {
eventsList = this.props.livepeer.events; eventsList = this.props.livepeer.events;
} }
let thisOrchObj = this.props.livepeer.thisOrchestrator; let thisOrchObj;
if (this.props.livepeer.selectedOrchestrator) { if (this.props.livepeer.selectedOrchestrator) {
thisOrchObj = this.props.livepeer.selectedOrchestrator; thisOrchObj = this.props.livepeer.selectedOrchestrator;
} }
@ -130,14 +130,14 @@ class Livepeer extends React.Component {
return ( return (
<div style={{ width: '100%', height: '100%' }}> <div style={{ width: '100%', height: '100%' }}>
<div className="row" style={{ margin: 0, padding: 0, backgroundColor: "rgba(180, 175, 252, 0.80)", boxSizing: "border-box", backdropDilter: "blur(6px)", boxSshadow: "9px 13px 18px 8px rgba(8, 7, 56, 0.692)", position: 'absolute', top: '0px', left: '0px', height: '300px', right: '0px', overflow: 'hidden' }}> <div className="row" style={{ margin: 0, padding: 0, backgroundColor: "rgba(180, 175, 252, 0.80)", boxSizing: "border-box", backdropDilter: "blur(6px)", boxSshadow: "9px 13px 18px 8px rgba(8, 7, 56, 0.692)", position: 'absolute', top: '0px', left: '0px', height: '300px', right: '0px', overflow: 'hidden' }}>
<div className="row" style={{ margin: 0, padding: 0 }}>
<button className="homeButton" onClick={() => { <button className="homeButton" onClick={() => {
this.setState({ redirectToHome: true }); this.setState({ redirectToHome: true });
}}> }}>
<img alt="" src="livepeer.png" width="100em" height="100em" /> <img alt="" src="livepeer.png" width="100em" height="100em" />
</button> </button>
</div> <div className="row" style={{alignItems: 'stretch', height:'100%'}}>
<Orchestrator thisOrchestrator={thisOrchObj} /> <Orchestrator thisOrchestrator={thisOrchObj} />
</div>
<div className="row metaSidebar" style={{ padding: 0 }}> <div className="row metaSidebar" style={{ padding: 0 }}>
<div className="stroke" style={{ margin: 0, padding: 0 }}> <div className="stroke" style={{ margin: 0, padding: 0 }}>
<h3>Smart contract prices</h3> <h3>Smart contract prices</h3>

View File

@ -36,7 +36,6 @@ const Orchestrator = (obj) => {
thisID = obj.thisOrchestrator.delegator.id; thisID = obj.thisOrchestrator.delegator.id;
thisUrl = "https://explorer.livepeer.org/accounts/" + thisID; thisUrl = "https://explorer.livepeer.org/accounts/" + thisID;
} }
}
return ( return (
<div className="hostInfo"> <div className="hostInfo">
@ -82,7 +81,20 @@ const Orchestrator = (obj) => {
</div> </div>
</div> </div>
</div> </div>
)
}
return (
<div className="hostInfo" style={{ height: '100%', width: '100%', display: 'flex' }}>
<div style={{ flexDirection: 'strokeSmollLeft', display: "flex", height: '100%', width: '100%' }}>
<div className="rowAlignLeft">
<img alt="" src="livepeer.png" width="30" height="30" />
<h3>Orchestrator Info</h3>
</div>
<div className="rowAlignLeft">
<p>Click on an orchestrator in the list below!</p>
</div>
</div>
</div>
) )
} }