From fdc22d1d48f172761d2eb2a418100c9d6ef26cde Mon Sep 17 00:00:00 2001 From: Marco van Dijk Date: Wed, 2 Mar 2022 13:25:22 +0100 Subject: [PATCH] Move side bar to top added a subcomponent for the event renderer (WIP) --- .gitignore | 1 + src/eventViewer.js | 23 +++++++ src/livepeer.js | 147 +++++++++++++++++++++++---------------------- src/style.css | 19 ++---- 4 files changed, 102 insertions(+), 88 deletions(-) diff --git a/.gitignore b/.gitignore index bd8c3b6..b15d4cf 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ yarn.lock log.txt build/ TODO +backend/src/config.js diff --git a/src/eventViewer.js b/src/eventViewer.js index e69de29..63e0e1e 100644 --- a/src/eventViewer.js +++ b/src/eventViewer.js @@ -0,0 +1,23 @@ +import React from "react"; +import EventButton from "./eventButton"; + +const EventViewer = (obj) => { + return ( +
+ {obj.events.map((eventObj, idx) => { + console.log(eventObj); + // TODO: make something that groups shit as long as the eventObj.transactionUrl is the same + return + })} +
+ ) +} + +export default EventViewer; \ No newline at end of file diff --git a/src/livepeer.js b/src/livepeer.js index c87a1f7..f57cd1c 100644 --- a/src/livepeer.js +++ b/src/livepeer.js @@ -8,7 +8,7 @@ import { connect } from "react-redux"; import { getQuotes, getBlockchainData, getEvents } from "./actions/livepeer"; -import EventButton from "./eventButton"; +import EventViewer from "./eventViewer"; const mapStateToProps = (state) => { return { @@ -120,81 +120,82 @@ class Livepeer extends React.Component { } return ( -
-
- +
+
+
+
+ +
+
+
+
+
+ +
+
+
+

Price Info

+
+
+ +

${lptPrice}

+

({lptPriceChange24h}%)

+
+
+ +

${ethPrice}

+

({ethPriceChange24h}%)

+
+
+
+

Smart contract prices L2

+
+

Reward Call:

+

${redeemRewardCostL2USD}

+
+
+

Claim Ticket:

+

${claimTicketCostL2USD}

+
+
+

Withdraw Fees:

+

${withdrawFeeCostL2USD}

+
+
+
+

Smart contract prices L1

+
+

Reward Call:

+

${redeemRewardCostL1USD}

+
+
+

Claim Ticket:

+

${claimTicketCostL1USD}

+
+
+

Withdraw Fees:

+

${withdrawFeeCostL1USD}

+
+
+
+
+
+
+
-
- +
+
-
- {eventsList.map((eventObj, idx) => { - console.log(eventObj); - // TODO: make something that groups shit as long as the eventObj.transactionUrl is the same - return - })} -
-
-
-
-
-
- -
-
-

Price Info

-
-
- -

${lptPrice}

-

({lptPriceChange24h}%)

-
-
- -

${ethPrice}

-

({ethPriceChange24h}%)

-
-

Smart contract prices L2

-
-

Reward Call:

-

${redeemRewardCostL2USD}

-
-
-

Claim Ticket:

-

${claimTicketCostL2USD}

-
-
-

Withdraw Fees:

-

${withdrawFeeCostL2USD}

-
-

Smart contract prices L1

-
-

Reward Call:

-

${redeemRewardCostL1USD}

-
-
-

Claim Ticket:

-

${claimTicketCostL1USD}

-
-
-

Withdraw Fees:

-

${withdrawFeeCostL1USD}

-
-
-
-
+
+ +
+
+
diff --git a/src/style.css b/src/style.css index 86302ba..c3a176a 100644 --- a/src/style.css +++ b/src/style.css @@ -50,6 +50,7 @@ p { text-shadow: 0.5px 0.5px 0.8px #948dff; color: #1a1b26; font-size: 1.2em; + margin: 0.3em; } /* width */ @@ -136,15 +137,12 @@ svg { align-items: center; align-content: center; opacity: 0.95; + flex-direction: column; } .metaSidebar { - background-color: rgba(180, 175, 252, 0.80); - box-shadow: 9px 13px 18px 8px rgba(8, 7, 56, 0.692); - border-radius: 30px; - box-sizing: border-box; - backdrop-filter: blur(6px); - height: 100%; + display: flex; + flex-direction: row; } .serviceButton { @@ -216,7 +214,6 @@ svg { .stroke { box-sizing: border-box; - height: 100%; padding-bottom: 20px; padding-top: 20px; margin: 10px; @@ -334,7 +331,6 @@ svg { } .main-container { - height: calc(100vh - 40px); display: flex; flex-direction: column; } @@ -535,13 +531,6 @@ svg { border-radius: 10px; box-sizing: border-box; } - .metaSidebar { - background-color: none; - width: 100%; - box-shadow: none; - border-radius: 10px; - box-sizing: border-box; - } .stroke { margin-left: 0; margin-right: 0;