From 9861adc7a7ae6b2be681b2169a1babcf8fe18176 Mon Sep 17 00:00:00 2001 From: Bochkovskyi Date: Sun, 24 Sep 2023 13:49:26 +0300 Subject: [PATCH] change time output --- src/components/message.jsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/components/message.jsx b/src/components/message.jsx index 27a22dd..9f1d55d 100644 --- a/src/components/message.jsx +++ b/src/components/message.jsx @@ -1,7 +1,10 @@ +import getFormattedTime from '@/utils/getFormattedDate' import Image from 'next/image' import Link from 'next/link' -export default function Message({ timeCreated, children }) { +export default function Message({ sentAt, children }) { + const time = getFormattedTime(sentAt) + return (
@@ -15,7 +18,7 @@ export default function Message({ timeCreated, children }) {

{children}

- {timeCreated} + {time}
)