diff options
author | 2025-02-11 21:54:00 -0500 | |
---|---|---|
committer | 2025-02-11 21:54:00 -0500 | |
commit | b9509422dd5f4c97d5c0746229037a53712ac7fe (patch) | |
tree | 351ffdadfbdc0b17e40d4cbb7beea816a86ed0aa /src | |
parent | fb5a063276f18e3238b13577358e811aa5f9ee31 (diff) |
switched to sqlite database
Diffstat (limited to 'src')
-rw-r--r-- | src/App.jsx | 2 | ||||
-rw-r--r-- | src/components/chatbubble.jsx | 2 | ||||
-rw-r--r-- | src/components/notes.jsx | 2 | ||||
-rw-r--r-- | src/components/player.jsx | 2 |
4 files changed, 3 insertions, 5 deletions
diff --git a/src/App.jsx b/src/App.jsx index fb72f6e..81cd893 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -49,11 +49,9 @@ function App() { apiToken.current = data.token; }); } else { - console.log("setting token"); apiToken.current = token; } fetch('/api/message').then((res) => res.json()).then((data) => { - console.log(data); setMessages(data); }); },[]); diff --git a/src/components/chatbubble.jsx b/src/components/chatbubble.jsx index 01dc6e5..a9c0c85 100644 --- a/src/components/chatbubble.jsx +++ b/src/components/chatbubble.jsx @@ -53,7 +53,7 @@ export default function ChatBubble({ id, position, text }) { } } if(keysPressed.current.includes('KeyR') && activatable) { - const newMesssage = prompt(); + const newMesssage = prompt("edit message"); if(newMesssage) { let data = new FormData(); data.append("token", apiToken.current); diff --git a/src/components/notes.jsx b/src/components/notes.jsx index 5f57b7f..d1bc454 100644 --- a/src/components/notes.jsx +++ b/src/components/notes.jsx @@ -6,7 +6,7 @@ export default function Notes() { const { messages } = useContext(AppContext); return (<> {messages.map((chatbubble) => { - return <ChatBubble key={chatbubble._id.$oid} id={chatbubble._id.$oid} position={chatbubble.position} text={chatbubble.message}/>; + return <ChatBubble key={chatbubble.message_id} id={chatbubble.message_id} position={chatbubble.position} text={chatbubble.message}/>; })} </>); } diff --git a/src/components/player.jsx b/src/components/player.jsx index f0c1e3e..b6a1ca3 100644 --- a/src/components/player.jsx +++ b/src/components/player.jsx @@ -29,7 +29,7 @@ export default function Player() { raycaster.current.setFromCamera(pointer, camera.current); const intersect = raycaster.current.intersectObjects(scene.children).at(0); if (intersect && intersect.object.name === 'ground' && intersect.distance < 10 && controlsRef.current.isLocked) { - const message = prompt(); + const message = prompt("new message"); if (message) { let data = new FormData(); data.append("position", JSON.stringify(intersect.point.toArray())); |