aboutsummaryrefslogtreecommitdiff
path: root/src/components/notes.jsx
blob: 027cd10fb7023ebff883e85ffb7351102816ecab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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}/>
        )}
    </>);
}