mirror of
https://github.com/stronk-dev/LivepeerEvents.git
synced 2025-07-05 10:45:10 +02:00
Also display round number at blocks for now. Probably good to go to a table style view soon
This commit is contained in:
parent
2fb915fee4
commit
21268de56f
@ -7,6 +7,14 @@ const Block = (obj) => {
|
|||||||
const thisLocalDate = dateObj.toLocaleString();
|
const thisLocalDate = dateObj.toLocaleString();
|
||||||
const thisOffset = (-dateObj.getTimezoneOffset() / 60);
|
const thisOffset = (-dateObj.getTimezoneOffset() / 60);
|
||||||
|
|
||||||
|
let currentRoundString;
|
||||||
|
if (obj.currentRound) {
|
||||||
|
currentRoundString =
|
||||||
|
<p style={{ overflowWrap: 'break-word' }}>
|
||||||
|
Round {obj.currentRound}
|
||||||
|
</p>
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="rowAlignLeft" style={{ margin: 0, marginTop: '1em', width: '100%' }}>
|
<div className="rowAlignLeft" style={{ margin: 0, marginTop: '1em', width: '100%' }}>
|
||||||
<a className="selectOrch" style={{ cursor: 'alias', margin: 0 }} target="_blank" rel="noopener noreferrer" href={obj.url}>
|
<a className="selectOrch" style={{ cursor: 'alias', margin: 0 }} target="_blank" rel="noopener noreferrer" href={obj.url}>
|
||||||
@ -15,6 +23,7 @@ const Block = (obj) => {
|
|||||||
<a className="selectOrch" style={{ cursor: 'alias', margin: 0 }} target="_blank" rel="noopener noreferrer" href={"https://arbiscan.io/block/" + obj.block}>
|
<a className="selectOrch" style={{ cursor: 'alias', margin: 0 }} target="_blank" rel="noopener noreferrer" href={"https://arbiscan.io/block/" + obj.block}>
|
||||||
<h3 style={{ padding: '0.2em', cursor: 'alias' }}>🔗</h3>
|
<h3 style={{ padding: '0.2em', cursor: 'alias' }}>🔗</h3>
|
||||||
</a>
|
</a>
|
||||||
|
{currentRoundString}
|
||||||
<span className="rowAlignRight darkText mobileSmallerFont" style={{ margin: 0 }}>
|
<span className="rowAlignRight darkText mobileSmallerFont" style={{ margin: 0 }}>
|
||||||
<p style={{ overflowWrap: 'break-word' }}>
|
<p style={{ overflowWrap: 'break-word' }}>
|
||||||
📅 {thisLocalDate}
|
📅 {thisLocalDate}
|
||||||
|
@ -172,9 +172,11 @@ const EventButton = (obj) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
let blockNumber;
|
let blockNumber;
|
||||||
if (obj.isFirstOfBlock) {
|
if (obj.isFirstOfBlock) {
|
||||||
blockNumber = <Block block={obj.isFirstOfBlock} time={obj.time} url={"https://arbiscan.io/tx/" + obj.eventObj.transactionHash} />
|
console.log(obj);
|
||||||
|
blockNumber = <Block currentRound={obj.currentRound} block={obj.isFirstOfBlock} time={obj.time} url={"https://arbiscan.io/tx/" + obj.eventObj.transactionHash} />
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -73,6 +73,7 @@ const EventViewer = (obj) => {
|
|||||||
let transferTicketEventsIdx = obj.transferTicketEvents.length - 1;
|
let transferTicketEventsIdx = obj.transferTicketEvents.length - 1;
|
||||||
let redeemTicketEventsIdx = obj.redeemTicketEvents.length - 1;
|
let redeemTicketEventsIdx = obj.redeemTicketEvents.length - 1;
|
||||||
let roundsIdx = obj.rounds.length - 1;
|
let roundsIdx = obj.rounds.length - 1;
|
||||||
|
let currentRound;
|
||||||
|
|
||||||
if (!filterActivated) {
|
if (!filterActivated) {
|
||||||
filtered += activateEventsIdx + 1;
|
filtered += activateEventsIdx + 1;
|
||||||
@ -222,7 +223,7 @@ const EventViewer = (obj) => {
|
|||||||
if (thisObj.blockTime > latestTime) {
|
if (thisObj.blockTime > latestTime) {
|
||||||
latestTime = thisObj.blockTime;
|
latestTime = thisObj.blockTime;
|
||||||
thisEvent = thisObj;
|
thisEvent = thisObj;
|
||||||
latestType = "round"
|
latestType = "round";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -455,6 +456,7 @@ const EventViewer = (obj) => {
|
|||||||
eventObj={thisEvent}
|
eventObj={thisEvent}
|
||||||
type={latestType}
|
type={latestType}
|
||||||
isFirstOfBlock={prevBlock}
|
isFirstOfBlock={prevBlock}
|
||||||
|
currentRound={roundsIdx >= 0 ? obj.rounds[roundsIdx].number : null}
|
||||||
time={thisEvent.blockTime}
|
time={thisEvent.blockTime}
|
||||||
setSearchTerm={obj.setSearchTerm}
|
setSearchTerm={obj.setSearchTerm}
|
||||||
monthlyStats={obj.monthlyStats}
|
monthlyStats={obj.monthlyStats}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user