diff --git a/src/app/page.jsx b/src/app/page.jsx index de56d69..bf9548d 100644 --- a/src/app/page.jsx +++ b/src/app/page.jsx @@ -7,7 +7,7 @@ export default function Home() { const [timeStamp, setTimeStamp] = useState(0) useEffect(() => { - setTimeStamp(Math.floor(Date.now() / 1000)) + setTimeStamp(Date.now()) }, []) return ( diff --git a/src/components/message.jsx b/src/components/message.jsx index 9f1d55d..4913b09 100644 --- a/src/components/message.jsx +++ b/src/components/message.jsx @@ -3,7 +3,10 @@ import Image from 'next/image' import Link from 'next/link' export default function Message({ sentAt, children }) { - const time = getFormattedTime(sentAt) + const time = getFormattedTime(sentAt, { + hourOptions: '2-digit', + minuteOptions: '2-digit', + }) return (