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

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