mirror of
https://github.com/stronk-dev/LivepeerEvents.git
synced 2025-07-05 10:45:10 +02:00
Visualise grouped events for parsing later on
This commit is contained in:
parent
da8bf5d70f
commit
b9f782b2e3
@ -40,7 +40,7 @@ const EventButton = (obj) => {
|
|||||||
return (
|
return (
|
||||||
<a href={obj.transactionUrl} className="row">
|
<a href={obj.transactionUrl} className="row">
|
||||||
<img alt="" src="livepeer.png" width="30" height="30" />
|
<img alt="" src="livepeer.png" width="30" height="30" />
|
||||||
{eventSpecificInfo}
|
{obj.idx}: {eventSpecificInfo}
|
||||||
</a>
|
</a>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -3,19 +3,32 @@ import EventButton from "./eventButton";
|
|||||||
import ScrollContainer from 'react-indiana-drag-scroll';
|
import ScrollContainer from 'react-indiana-drag-scroll';
|
||||||
|
|
||||||
const EventViewer = (obj) => {
|
const EventViewer = (obj) => {
|
||||||
|
let txCounter = 0;
|
||||||
|
let currentTx = "";
|
||||||
return (
|
return (
|
||||||
<div className="stroke roundedOpaque" style={{ padding: 0, margin: 0, marginTop: '2em', position: 'absolute', bottom: 0, top: '200px', left: '0px', right: '0px', overflowY: 'auto', overflowX: 'hidden', width: '100%' }}>
|
<div className="stroke roundedOpaque" style={{ padding: 0, margin: 0, marginTop: '2em', position: 'absolute', bottom: 0, top: '200px', left: '0px', right: '0px', overflowY: 'auto', overflowX: 'hidden', width: '100%' }}>
|
||||||
{obj.events.map((eventObj, idx) => {
|
<div className="content-wrapper">
|
||||||
// TODO: make something that groups shit as long as the eventObj.transactionUrl is the same
|
<ScrollContainer className="overflow-container" hideScrollbars={false}>
|
||||||
return <EventButton
|
<div className="overflow-content" style={{ cursor: 'grab' }}>
|
||||||
key={eventObj.transactionUrl + idx}
|
{obj.events.map((eventObj, idx) => {
|
||||||
transactionUrl={eventObj.transactionUrl}
|
if(currentTx != eventObj.transactionHash){
|
||||||
transactionHash={eventObj.transactionHash}
|
txCounter++;
|
||||||
name={eventObj.name}
|
currentTx = eventObj.transactionHash;
|
||||||
data={eventObj.data}
|
}
|
||||||
address={eventObj.address}
|
// TODO: make something that groups shit as long as the eventObj.transactionUrl is the same
|
||||||
/>
|
return <EventButton
|
||||||
})}
|
key={eventObj.transactionUrl + idx}
|
||||||
|
transactionUrl={eventObj.transactionUrl}
|
||||||
|
transactionHash={eventObj.transactionHash}
|
||||||
|
name={eventObj.name}
|
||||||
|
data={eventObj.data}
|
||||||
|
address={eventObj.address}
|
||||||
|
idx={txCounter}
|
||||||
|
/>
|
||||||
|
})}
|
||||||
|
</div>
|
||||||
|
</ScrollContainer>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user