diff --git a/src/components/MonthlyGraphs.js b/src/components/MonthlyGraphs.js index 6567d5c..64797f9 100644 --- a/src/components/MonthlyGraphs.js +++ b/src/components/MonthlyGraphs.js @@ -1,11 +1,11 @@ import React, { useState } from 'react'; import { useSelector } from 'react-redux'; import { VictoryPie } from 'victory'; -import { RadioGroup, Radio } from "@mantine/core"; +import { SegmentedControl } from "@mantine/core"; const MonthlyGraphs = (obj) => { const livepeer = useSelector((state) => state.livepeerstate); - const [activeGraph, setGraph] = useState(1); + const [activeGraph, setGraph] = useState(2); let totalGraphs = 0; @@ -381,24 +381,42 @@ const MonthlyGraphs = (obj) => { thisColour = "orange"; } + let dataRow = []; + if (totalGraphs && stakeObj) { + dataRow.push({ label: 'Stake', value: '1' }); + } + if (totalGraphs && earningsObj) { + dataRow.push({ label: 'Earnings', value: '2' }); + } + if (totalGraphs && broadcasterObj) { + dataRow.push({ label: 'Broadcasters', value: '3' }); + } + return (