diff --git a/src/components/message.jsx b/src/components/message.jsx index 5dedae5..977a9ed 100644 --- a/src/components/message.jsx +++ b/src/components/message.jsx @@ -1,16 +1,10 @@ -import { useEffect, useState } from 'react' import { timeFormatter } from '@/utils/getFormattedDate' import Image from 'next/image' import Link from 'next/link' export default function Message({ sentAt, children }) { - const [time, setTime] = useState(0) const { format: formatTime } = timeFormatter() - useEffect(() => { - setTime(formatTime(sentAt)) - }, [sentAt, formatTime]) - return (
@@ -24,7 +18,7 @@ export default function Message({ sentAt, children }) {

{children}

- {time} + {formatTime(sentAt)}
)