From 2361295f5f678b8588d441cefde8016a5b17398a Mon Sep 17 00:00:00 2001 From: Immanuel Onyeka Date: Sat, 23 Oct 2021 12:09:40 -0400 Subject: [PATCH] Display date information for entries --- src/Call.jsx | 3 +++ src/Feed.jsx | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Call.jsx b/src/Call.jsx index 6fd58c0..73d3f2a 100644 --- a/src/Call.jsx +++ b/src/Call.jsx @@ -71,6 +71,9 @@ function Call(props) { {hour: '2-digit', minute: '2-digit'}) } - {props.info.call_type} + + {new Date(props.info.created_at).toLocaleDateString()} +
diff --git a/src/Feed.jsx b/src/Feed.jsx index 598daf4..1878eb9 100644 --- a/src/Feed.jsx +++ b/src/Feed.jsx @@ -76,14 +76,16 @@ function Feed(props) { } return ( -
  • +
  • {entry.direction == 'inbound' ? entry.from : entry.to}

    - {(new Date(entry.created_at).toLocaleTimeString([], + {(new Date(entry.created_at).toLocaleDateString())} + {(new Date(entry.created_at).toLocaleTimeString([], {hour: '2-digit', minute: '2-digit'}))} - {entry.call_type}