From e583b61ae585cb6bd98a232aac195bf9e6f6d096 Mon Sep 17 00:00:00 2001 From: Hawk Date: Fri, 24 Apr 2020 23:36:51 +0200 Subject: [PATCH] added refresh button on resource chart close #31 --- .../src/components/resourcechart/resourcechart.js | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/resourcechart/resourcechart.js b/frontend/src/components/resourcechart/resourcechart.js index 1029368..b943e16 100644 --- a/frontend/src/components/resourcechart/resourcechart.js +++ b/frontend/src/components/resourcechart/resourcechart.js @@ -11,11 +11,15 @@ import CardContent from '@material-ui/core/CardContent'; import Typography from '@material-ui/core/Typography'; import { makeStyles } from '@material-ui/core/styles'; import Grid from '@material-ui/core/Grid'; +import Button from '@material-ui/core/Button'; const useStyles = makeStyles((theme) => ({ root: { display: 'flex', }, + card: { + padding: 20 + } })); const output = (data) => { @@ -86,6 +90,8 @@ export default function ResourceChart(props) { case 7: qualitySortedData[qualitySortedData.length - 1]["q7"] = dataWithDate[i]["price"]; break; + default: + break; } } else { qualitySortedData.push(dataWithDate[i]); @@ -105,7 +111,9 @@ export default function ResourceChart(props) { loadData(); } - + const handleClick = (e) => { + loadData() + } return (
@@ -116,10 +124,13 @@ export default function ResourceChart(props) { - + {output(data)} +