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

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