From 3f842a3691419c5d18504960408085b8e5a52bd7 Mon Sep 17 00:00:00 2001 From: Boubrid Ihab Date: Mon, 23 May 2022 23:13:20 +0100 Subject: fix: remove generateKey function and make it inline --- modern/src/reports/SummaryReportPage.js | 4 +--- modern/src/reports/TripReportPage.js | 1 + 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'modern') diff --git a/modern/src/reports/SummaryReportPage.js b/modern/src/reports/SummaryReportPage.js index b428ecf0..49fc7bb1 100644 --- a/modern/src/reports/SummaryReportPage.js +++ b/modern/src/reports/SummaryReportPage.js @@ -77,8 +77,6 @@ const SummaryReportPage = () => { } }; - const generateKey = (item) => (`${item.deviceId}_${Date.parse(item.startTime)}`); - return ( } breadcrumbs={['reportTitle', 'reportSummary']}> @@ -102,7 +100,7 @@ const SummaryReportPage = () => { {items.map((item) => ( - + {columns.map((key) => ( {formatValue(item, key)} diff --git a/modern/src/reports/TripReportPage.js b/modern/src/reports/TripReportPage.js index 37ba2e96..773e7510 100644 --- a/modern/src/reports/TripReportPage.js +++ b/modern/src/reports/TripReportPage.js @@ -79,6 +79,7 @@ const TripReportPage = () => { return item[key]; } }; + return ( } breadcrumbs={['reportTitle', 'reportTrips']}> -- cgit v1.2.3