import { useContext } from "react";
import ChatBubble from "./chatbubble";
import { AppContext } from "../App";

export default function Notes() {
    const { messages } = useContext(AppContext);
    return (<>
        {messages.map((chatbubble) =>  {
            return <ChatBubble key={chatbubble._id.$oid} id={chatbubble._id.$oid} position={chatbubble.position} text={chatbubble.message}/>;
        })}
    </>);
}
