From d0b305ec6f66b14fe290d87be39d4fbce663ad4f Mon Sep 17 00:00:00 2001 From: Sam Date: Wed, 1 Sep 2021 13:31:43 +0200 Subject: [PATCH] Client - display elevation only on Statistics (not in dashboard) --- .../components/Common/Stats/StatsChart.jsx | 42 ++++++++++--------- .../src/components/Common/Stats/index.jsx | 10 ++++- .../src/components/Dashboard/Statistics.jsx | 7 +++- .../src/components/Statistics/index.jsx | 1 + 4 files changed, 39 insertions(+), 21 deletions(-) diff --git a/fittrackee_client/src/components/Common/Stats/StatsChart.jsx b/fittrackee_client/src/components/Common/Stats/StatsChart.jsx index 1862b0d5..13367fa6 100644 --- a/fittrackee_client/src/components/Common/Stats/StatsChart.jsx +++ b/fittrackee_client/src/components/Common/Stats/StatsChart.jsx @@ -28,7 +28,7 @@ export default class StatsCharts extends React.PureComponent { render() { const { displayedData } = this.state - const { sports, stats, t } = this.props + const { sports, stats, t, withElevation } = this.props if (Object.keys(stats).length === 0) { return t('common:No workouts.') } @@ -53,24 +53,28 @@ export default class StatsCharts extends React.PureComponent { /> {t('statistics:duration')} - - + {withElevation && ( + <> + + + + )}