diff --git a/src/app/page.jsx b/src/app/page.jsx index bf9548d..bdf695f 100644 --- a/src/app/page.jsx +++ b/src/app/page.jsx @@ -1,29 +1,27 @@ 'use client' -import { useEffect, useState } from 'react' import Message from '@/components/message' -export default function Home() { - const [timeStamp, setTimeStamp] = useState(0) - - useEffect(() => { - setTimeStamp(Date.now()) - }, []) +const now = Date.now() +const MOCK_MESSAGES = [ + { sentAt: now - 1000 * 60 * 30, content: `...` }, + { sentAt: now - 1000 * 60 * 20, content: `I\'m not empty` }, + { sentAt: now - 1000 * 60 * 10, content: `Hello, i\'m a message! 😎` }, + { + sentAt: now, + content: + 'Lorem ipsum dolor sit amet consectetur adipisicing elit. Id, porro', + }, +] +export default function Home() { return (
- - Lorem ipsum dolor sit, amet consectetur adipisicing elit. Quae - architecto quis iure ex id voluptatum reprehenderit quod cum laboriosam. - Dicta temporibus quis sed assumenda tempore perferendis voluptas magnam - minima dignissimos! Dignissimos porro ea incidunt quae blanditiis, - exercitationem deserunt beatae omnis temporibus officiis, consequatur - nulla accusamus commodi officia minus, ullam unde optio nisi similique - ab maiores? Perferendis aliquid minus laudantium error. - - Hello, i'm a message! 😎 - I'm not empty - ... + {MOCK_MESSAGES.map(({ sentAt, content }, i) => ( + + {content} + + ))}
) }