diff --git a/src/components/MonthlyGraphs.js b/src/components/MonthlyGraphs.js index 8dce606..6567d5c 100644 --- a/src/components/MonthlyGraphs.js +++ b/src/components/MonthlyGraphs.js @@ -1,7 +1,7 @@ import React, { useState } from 'react'; import { useSelector } from 'react-redux'; import { VictoryPie } from 'victory'; -import { Pagination } from "@mantine/core"; +import { RadioGroup, Radio } from "@mantine/core"; const MonthlyGraphs = (obj) => { const livepeer = useSelector((state) => state.livepeerstate); @@ -372,47 +372,39 @@ const MonthlyGraphs = (obj) => { } } - let renderStake = false; - let renderEarnings = false; - let renderBread = false; - let graphIndex = activeGraph; - if (totalGraphs && stakeObj) { - if (graphIndex == 1) { - renderStake = true; - graphIndex = 0; - } else { - graphIndex--; - } - } - if (graphIndex == 1 && graphIndex && totalGraphs && earningsObj) { - if (graphIndex == 1) { - renderEarnings = true; - graphIndex = 0; - } else { - graphIndex--; - } - } - graphIndex--; - if (graphIndex == 1 && graphIndex && totalGraphs && broadcasterObj) { - if (graphIndex == 1) { - renderBread = true; - graphIndex = 0; - } else { - graphIndex--; - } + let thisColour; + if (activeGraph == 1) { + thisColour = "violet"; + } else if (activeGraph == 2) { + thisColour = "green"; + } else if (activeGraph == 3) { + thisColour = "orange"; } return ( -