From ea8048f150e1e78711967ee6349821a3b5eb2bc5 Mon Sep 17 00:00:00 2001 From: John Date: Tue, 10 Dec 2024 23:23:14 +0000 Subject: [PATCH] disable download buttons when we don't have data yet --- src/components/graphs/ExportButtons/ExportButtons.js | 12 ++++++++++-- .../LongTermAveragesGraph/LongTermAveragesGraph.js | 1 + 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/components/graphs/ExportButtons/ExportButtons.js b/src/components/graphs/ExportButtons/ExportButtons.js index df2c45ae..4de37d8b 100644 --- a/src/components/graphs/ExportButtons/ExportButtons.js +++ b/src/components/graphs/ExportButtons/ExportButtons.js @@ -14,6 +14,7 @@ export default class ExportButtons extends React.Component { static propTypes = { onExportXlsx: PropTypes.func.isRequired, onExportCsv: PropTypes.func.isRequired, + disabled: PropTypes.bool, }; render() { @@ -22,8 +23,15 @@ export default class ExportButtons extends React.Component { {downloadGraphDataLabel} - - + + ); } diff --git a/src/components/graphs/LongTermAveragesGraph/LongTermAveragesGraph.js b/src/components/graphs/LongTermAveragesGraph/LongTermAveragesGraph.js index 334df76c..7876a350 100644 --- a/src/components/graphs/LongTermAveragesGraph/LongTermAveragesGraph.js +++ b/src/components/graphs/LongTermAveragesGraph/LongTermAveragesGraph.js @@ -259,6 +259,7 @@ export default class LongTermAveragesGraph extends React.Component { )}