From 680dd91c0c0200bd4948173df0b601e16f511e6e Mon Sep 17 00:00:00 2001
From: Quentin Gliech <quentingliech@gmail.com>
Date: Thu, 13 Feb 2020 00:19:22 +0100
Subject: webui: create comment form

---
 webui/src/Date.tsx | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

(limited to 'webui/src/Date.tsx')

diff --git a/webui/src/Date.tsx b/webui/src/Date.tsx
index 9380d2fc..a830546c 100644
--- a/webui/src/Date.tsx
+++ b/webui/src/Date.tsx
@@ -1,11 +1,16 @@
 import Tooltip from '@material-ui/core/Tooltip/Tooltip';
 import moment from 'moment';
 import React from 'react';
+import Moment from 'react-moment';
+
+const HOUR = 1000 * 3600;
+const DAY = 24 * HOUR;
+const WEEK = 7 * DAY;
 
 type Props = { date: string };
 const Date = ({ date }: Props) => (
   <Tooltip title={moment(date).format('MMMM D, YYYY, h:mm a')}>
-    <span> {moment(date).fromNow()} </span>
+    <Moment date={date} fromNowDuring={WEEK} />
   </Tooltip>
 );
 
-- 
cgit 


From 8b85780d76ad45675582f4478eedb026b7ac25e1 Mon Sep 17 00:00:00 2001
From: Quentin Gliech <quentingliech@gmail.com>
Date: Thu, 13 Feb 2020 00:53:29 +0100
Subject: webui: start reorganizing the component structure

---
 webui/src/Date.tsx | 17 -----------------
 1 file changed, 17 deletions(-)
 delete mode 100644 webui/src/Date.tsx

(limited to 'webui/src/Date.tsx')

diff --git a/webui/src/Date.tsx b/webui/src/Date.tsx
deleted file mode 100644
index a830546c..00000000
--- a/webui/src/Date.tsx
+++ /dev/null
@@ -1,17 +0,0 @@
-import Tooltip from '@material-ui/core/Tooltip/Tooltip';
-import moment from 'moment';
-import React from 'react';
-import Moment from 'react-moment';
-
-const HOUR = 1000 * 3600;
-const DAY = 24 * HOUR;
-const WEEK = 7 * DAY;
-
-type Props = { date: string };
-const Date = ({ date }: Props) => (
-  <Tooltip title={moment(date).format('MMMM D, YYYY, h:mm a')}>
-    <Moment date={date} fromNowDuring={WEEK} />
-  </Tooltip>
-);
-
-export default Date;
-- 
cgit 

