aboutsummaryrefslogtreecommitdiff
path: root/src/components/notes.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/notes.jsx')
-rw-r--r--src/components/notes.jsx12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/components/notes.jsx b/src/components/notes.jsx
index 0dd267a..027cd10 100644
--- a/src/components/notes.jsx
+++ b/src/components/notes.jsx
@@ -1,14 +1,12 @@
+import { useContext } from "react";
import ChatBubble from "./chatbubble";
-
-const chatbubbles = [
- {position: [0,0,-3], text: "ugh. really struggling with double bleeds in my ankles. makes it hard to do very much of anything, let alone focus for my hobbies"},
- {position: [-1,0,-5], text: "reddit is everywhere on google and i am sick of it... why can't there be a good forum site?"},
-];
+import { AppContext } from "../App";
export default function Notes() {
+ const { messages } = useContext(AppContext);
return (<>
- {chatbubbles.map((chatbubble, index) =>
- <ChatBubble key={index} position={chatbubble.position} text={chatbubble.text}/>
+ {messages.map((chatbubble, index) =>
+ <ChatBubble key={index} position={chatbubble.position} text={chatbubble.message}/>
)}
</>);
}