aboutsummaryrefslogtreecommitdiff
path: root/src/components/notes.jsx
diff options
context:
space:
mode:
authorLibravatar Silas Bartha <silas@exvacuum.dev>2025-02-10 16:50:19 -0500
committerLibravatar Silas Bartha <silas@exvacuum.dev>2025-02-10 16:50:19 -0500
commit89b411863b452fdab9d2b4a0cfd0e9d79d991f72 (patch)
tree02de0ae38340386c0ac7bb6e8e4b6ab4317878bd /src/components/notes.jsx
parent55a0a3de6550f0142b79ab40645c20b465ddded8 (diff)
Reading messages from DB + clicking to place new messages
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}/>
)}
</>);
}