From 888a3f001b43255ca1b6a2b4604b202e685e2bc6 Mon Sep 17 00:00:00 2001 From: Dirk Klimpel <5740567+dklimpel@users.noreply.github.com> Date: Thu, 17 Feb 2022 20:51:11 +0100 Subject: [PATCH] Move date format to a constant in `rooms.js` (#238) --- src/components/rooms.js | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/src/components/rooms.js b/src/components/rooms.js index fa01c77..309b2c4 100644 --- a/src/components/rooms.js +++ b/src/components/rooms.js @@ -41,6 +41,15 @@ import { RoomDirectorySaveButton, } from "./RoomDirectory"; +const date_format = { + year: "numeric", + month: "2-digit", + day: "2-digit", + hour: "2-digit", + minute: "2-digit", + second: "2-digit", +}; + const useStyles = makeStyles(theme => ({ helper_forward_extremities: { fontFamily: "Roboto, Helvetica, Arial, sans-serif", @@ -247,14 +256,7 @@ export const RoomShow = props => { @@ -287,14 +289,7 @@ export const RoomShow = props => {