diff --git a/www/js/metrics/MetricsTab.tsx b/www/js/metrics/MetricsTab.tsx
index 6d8744c85..56ce86a0d 100644
--- a/www/js/metrics/MetricsTab.tsx
+++ b/www/js/metrics/MetricsTab.tsx
@@ -23,6 +23,7 @@ import TimelineContext from '../TimelineContext';
import { isoDateRangeToTsRange, isoDatesDifference } from '../diary/timelineHelper';
import { MetricsSummaries } from 'e-mission-common';
+const DEFAULT_SECTIONS_TO_SHOW = ['footprint', 'active_travel', 'summary'] as const;
export const METRIC_LIST = ['duration', 'mean_speed', 'count', 'distance'] as const;
async function fetchMetricsFromServer(
@@ -135,6 +136,8 @@ const MetricsTab = () => {
}
}
+ const sectionsToShow =
+ appConfig?.metrics?.phone_dashboard_ui?.sections || DEFAULT_SECTIONS_TO_SHOW;
const { width: windowWidth } = useWindowDimensions();
const cardWidth = windowWidth * 0.88;
@@ -154,43 +157,49 @@ const MetricsTab = () => {
-
-
-
-
-
-
-
-
-
-
-
-
-
- {/* */}
-
+ {sectionsToShow.includes('footprint') && (
+
+
+
+
+ )}
+ {sectionsToShow.includes('active_travel') && (
+
+
+
+
+
+ )}
+ {sectionsToShow.includes('summary') && (
+
+
+
+
+ {/* */}
+
+ )}
>
);