mirror of
https://github.com/stronk-dev/LivepeerEvents.git
synced 2025-07-05 10:45:10 +02:00
ens, 3box avatar placement
This commit is contained in:
parent
9f7a50d576
commit
ac796e0fdb
@ -77,13 +77,13 @@ const Address = (obj) => {
|
|||||||
thisName = thisInfo.domain;
|
thisName = thisInfo.domain;
|
||||||
if (thisInfo.avatar) {
|
if (thisInfo.avatar) {
|
||||||
thisIcon =
|
thisIcon =
|
||||||
<a className="selectOrchLight" style={{ padding: '0.2em', cursor: 'alias' }} target="_blank" rel="noopener noreferrer" href={"https://app.ens.domains/name/" + thisInfo.domain + "/details"} >
|
<a className="selectOrchLight" style={{ marginRight: '0.2em', cursor: 'alias' }} target="_blank" rel="noopener noreferrer" href={"https://app.ens.domains/name/" + thisInfo.domain + "/details"} >
|
||||||
<img alt="" src={thisInfo.avatar.url} width="20em" height="20em" />
|
<img alt="" src={thisInfo.avatar.url} width="20em" height="20em" style={{ margin: '0.2em', padding: '0.2em' }} />
|
||||||
</a >
|
</a >
|
||||||
} else {
|
} else {
|
||||||
thisIcon =
|
thisIcon =
|
||||||
<a className="selectOrchLight" style={{ padding: '0.2em', cursor: 'alias' }} target="_blank" rel="noopener noreferrer" href={"https://app.ens.domains/name/" + thisInfo.domain + "/details"} >
|
<a className="selectOrchLight" style={{ marginRight: '0.2em', cursor: 'alias' }} target="_blank" rel="noopener noreferrer" href={"https://app.ens.domains/name/" + thisInfo.domain + "/details"} >
|
||||||
<img alt="" src="ens.png" width="20em" height="20em" />
|
<img alt="" src="ens.png" width="20em" height="20em" style={{ margin: '0.2em', padding: '0.2em' }} />
|
||||||
</a >
|
</a >
|
||||||
}
|
}
|
||||||
} else if (hasThreeBox) {
|
} else if (hasThreeBox) {
|
||||||
@ -93,7 +93,10 @@ const Address = (obj) => {
|
|||||||
thisName = <span className="elipsText elipsOnMobileExtra">{obj.address}</span>;
|
thisName = <span className="elipsText elipsOnMobileExtra">{obj.address}</span>;
|
||||||
}
|
}
|
||||||
if (thisInfo.image) {
|
if (thisInfo.image) {
|
||||||
thisIcon = <img alt="" src={"https://cloudflare-ipfs.com/ipfs/" + thisInfo.image} width="20em" height="20em" style={{ margin: 0, padding: 0 }} />
|
thisIcon =
|
||||||
|
<a className="selectOrch" style={{ marginRight: '0.5em', cursor: 'grab'}} disabled>
|
||||||
|
<img alt="" src={"https://cloudflare-ipfs.com/ipfs/" + thisInfo.image} width="20em" height="20em" style={{ margin: 0, padding: 0 }} />
|
||||||
|
</a >
|
||||||
} else {
|
} else {
|
||||||
thisIcon = null;
|
thisIcon = null;
|
||||||
}
|
}
|
||||||
@ -108,7 +111,7 @@ const Address = (obj) => {
|
|||||||
<img alt="" src="livepeer.png" width="20em" height="20em" />
|
<img alt="" src="livepeer.png" width="20em" height="20em" />
|
||||||
</a>
|
</a>
|
||||||
{thisIcon}
|
{thisIcon}
|
||||||
<span className="elipsText elipsOnMobile">{thisName}</span>
|
<span className="elipsText elipsOnMobileExtra">{thisName}</span>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,7 @@ const EventButtonAddress = (obj) => {
|
|||||||
const [hasThreeBoxRefreshed, setThreeBoxRefresh] = useState(false);
|
const [hasThreeBoxRefreshed, setThreeBoxRefresh] = useState(false);
|
||||||
const [orchInfo, setOrchInfo] = useState(null);
|
const [orchInfo, setOrchInfo] = useState(null);
|
||||||
const now = new Date().getTime();
|
const now = new Date().getTime();
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
let thisInfo = null;
|
let thisInfo = null;
|
||||||
let thisDomain = null;
|
let thisDomain = null;
|
||||||
@ -87,7 +87,7 @@ const EventButtonAddress = (obj) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (thisInfo && thisInfo != orchInfo){
|
if (thisInfo && thisInfo != orchInfo) {
|
||||||
console.log("Setting INFO obj");
|
console.log("Setting INFO obj");
|
||||||
setOrchInfo(thisInfo);
|
setOrchInfo(thisInfo);
|
||||||
}
|
}
|
||||||
@ -113,7 +113,7 @@ const EventButtonAddress = (obj) => {
|
|||||||
shouldUpdate = true;
|
shouldUpdate = true;
|
||||||
}
|
}
|
||||||
// Preload Orch info
|
// Preload Orch info
|
||||||
if (shouldUpdate){
|
if (shouldUpdate) {
|
||||||
console.log("Refresh due to non-existing orch in global state");
|
console.log("Refresh due to non-existing orch in global state");
|
||||||
getOrchestratorInfoSilent(obj.address);
|
getOrchestratorInfoSilent(obj.address);
|
||||||
}
|
}
|
||||||
@ -125,8 +125,8 @@ const EventButtonAddress = (obj) => {
|
|||||||
thisName = <h4 className="elipsText elipsOnMobileExtra">{orchInfo.domain}</h4>;
|
thisName = <h4 className="elipsText elipsOnMobileExtra">{orchInfo.domain}</h4>;
|
||||||
if (orchInfo.avatar) {
|
if (orchInfo.avatar) {
|
||||||
thisIcon =
|
thisIcon =
|
||||||
<a className="selectOrch" style={{ padding: '0', cursor: 'alias' }} target="_blank" rel="noopener noreferrer" href={"https://app.ens.domains/name/" + orchInfo.domain + "/details"} >
|
<a className="selectOrch" style={{ marginRight: '0.2em', cursor: 'alias' }} target="_blank" rel="noopener noreferrer" href={"https://app.ens.domains/name/" + orchInfo.domain + "/details"} >
|
||||||
<img alt="" src={orchInfo.avatar.url} width="20em" height="20em" style={{ margin: 0, padding: 0 }} />
|
<img alt="" src={orchInfo.avatar.url} width="20em" height="20em" style={{ margin: '0.2em', padding: '0.2em' }} />
|
||||||
</a >
|
</a >
|
||||||
}
|
}
|
||||||
} else if (orchInfo && (orchInfo.name || orchInfo.image)) {
|
} else if (orchInfo && (orchInfo.name || orchInfo.image)) {
|
||||||
@ -136,7 +136,10 @@ const EventButtonAddress = (obj) => {
|
|||||||
thisName = <span className="elipsText elipsOnMobileExtra">{obj.address}</span>;
|
thisName = <span className="elipsText elipsOnMobileExtra">{obj.address}</span>;
|
||||||
}
|
}
|
||||||
if (orchInfo.image) {
|
if (orchInfo.image) {
|
||||||
thisIcon = <img alt="" src={"https://cloudflare-ipfs.com/ipfs/" + orchInfo.image} width="20em" height="20em" style={{ margin: 0, padding: 0 }} />
|
thisIcon =
|
||||||
|
<a className="selectOrch" style={{ marginRight: '0.5em', cursor: 'grab'}} disabled>
|
||||||
|
<img alt="" src={"https://cloudflare-ipfs.com/ipfs/" + orchInfo.image} width="20em" height="20em" style={{ margin: 0, padding: 0 }} style={{ margin: 0, padding: 0 }} />
|
||||||
|
</a >
|
||||||
} else {
|
} else {
|
||||||
thisIcon = null;
|
thisIcon = null;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user