diff --git a/src/App.jsx b/src/App.jsx index 0e4a0bf..ecea54a 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -20,9 +20,6 @@ function App() { background-image: radial-gradient( circle farthest-corner at 12.3% 19.3%, rgba(85,88,218,1) 0%, rgba(95,209,249,1) 100.2% ); ` - const setLoadingURL = () => {} - const loadingURL = () => {} - return ( diff --git a/src/components/Crypto/Crypto.jsx b/src/components/Crypto/Crypto.jsx index d9638e4..cc816fe 100644 --- a/src/components/Crypto/Crypto.jsx +++ b/src/components/Crypto/Crypto.jsx @@ -5,7 +5,7 @@ import {useParams} from 'react-router-dom' import { Chart as ChartJS } from 'chart.js/auto' import { Chart, Line } from 'react-chartjs-2' //WTF https://stackoverflow.com/questions/67727603/error-category-is-not-a-registered-scale -import { Grid, Button, capitalize } from '@mui/material'; +import { Grid, Button, capitalize, Switch, FormControlLabel } from '@mui/material'; import styled from 'styled-components'; import CryptoPricesModule from './CryptoPricesModule'; import CryptoButtonModule from './CryptoButtonModule'; @@ -112,6 +112,8 @@ const Crypto = () => { const [contentLoaded, setContentLoaded] = useState(false) const [lineDatesInterval, setLineDatesInterval] = useState('week') + + const [linePoints, setLinePoints] = useState(true) const getCryptoData = async () => { @@ -290,7 +292,8 @@ const Crypto = () => { datasets: [ { data: cryptoPrices[lineDatesInterval], - borderColor: "#fff" + borderColor: "#fff", + pointRadius: (linePoints ? 4 : 0), } ] }} @@ -333,7 +336,7 @@ const Crypto = () => { className='line' /> { [ @@ -352,6 +355,20 @@ const Crypto = () => { /> )) } + { + + setLinePoints(!linePoints)}} + color="secondary" + /> + } + label="Line Points" + sx={{color: "#fff"}} + />