diff --git a/webapp/src/pages/chat.js b/webapp/src/pages/chat.js
new file mode 100644
index 0000000..6f5693e
--- /dev/null
+++ b/webapp/src/pages/chat.js
@@ -0,0 +1,64 @@
+import { useState, useEffect } from 'react'
+import { useParams } from 'react-router-dom'
+import {
+ Box,
+ TextField,
+ Button
+} from '@material-ui/core';
+
+import client from '../client'
+
+
+const Chat = () => {
+ const [posts, setPosts] = useState([])
+ const [game, setGame] = useState({})
+ const [message, setMessage] = useState("")
+ const { gameId } = useParams()
+
+ useEffect(() => {
+ client.getGame(gameId).then(game => setGame(game))
+ }, [gameId])
+
+ const handleChange = (e) => {
+ setMessage(e.target.value)
+ }
+
+ const handleSubmit = (e) => {
+ e.preventDefault()
+
+ client
+ .createPostForGameId(gameId, message)
+ .then(r => {
+ log.debug(`Message posted`)
+ })
+
+ // maybe disable sending and show a spinner instead
+ setMessage("")
+ }
+
+ return (
+
+
{game.name}
+ Chat
+
+
+
+ )
+}
+
+export default Chat
diff --git a/webapp/src/pages/game.js b/webapp/src/pages/game.js
index c3c9c53..e93a67a 100644
--- a/webapp/src/pages/game.js
+++ b/webapp/src/pages/game.js
@@ -1,5 +1,5 @@
import { useState, useEffect } from 'react'
-import { useParams } from 'react-router-dom'
+import { useParams, Link } from 'react-router-dom'
import client from '../client'
@@ -13,8 +13,10 @@ const Game = () => {
}, [gameId])
return (
-
+
{game.name}
+
+
Game chat
)
}