From 158e7dbe98221770fcd03d12b4f4ee058a3aba49 Mon Sep 17 00:00:00 2001 From: Dirk Klimpel <5740567+dklimpel@users.noreply.github.com> Date: Thu, 17 Feb 2022 20:52:13 +0100 Subject: [PATCH] Move date format to a constant in `EventReports.js` (#237) --- src/components/EventReports.js | 36 ++++++++++++---------------------- 1 file changed, 12 insertions(+), 24 deletions(-) diff --git a/src/components/EventReports.js b/src/components/EventReports.js index c73647f..fc8f621 100644 --- a/src/components/EventReports.js +++ b/src/components/EventReports.js @@ -15,6 +15,15 @@ import { import PageviewIcon from "@material-ui/icons/Pageview"; import ViewListIcon from "@material-ui/icons/ViewList"; +const date_format = { + year: "numeric", + month: "2-digit", + day: "2-digit", + hour: "2-digit", + minute: "2-digit", + second: "2-digit", +}; + const ReportPagination = props => ( ); @@ -33,14 +42,7 @@ export const ReportShow = props => { @@ -72,14 +74,7 @@ export const ReportShow = props => { @@ -116,14 +111,7 @@ export const ReportList = ({ ...props }) => {