diff --git a/src/components/AddMapButton.js b/src/components/AddMapButton.js
new file mode 100644
index 0000000..76f31a2
--- /dev/null
+++ b/src/components/AddMapButton.js
@@ -0,0 +1,38 @@
+import React, { useRef } from "react";
+import { IconButton } from "theme-ui";
+
+function AddMapButton({ handleMapChange }) {
+ const fileInputRef = useRef();
+
+ function handleIconClicked() {
+ if (fileInputRef.current) {
+ fileInputRef.current.click();
+ }
+ }
+
+ return (
+ <>
+
+
+
+
+ >
+ );
+}
+
+export default AddMapButton;
diff --git a/src/components/Map.js b/src/components/Map.js
new file mode 100644
index 0000000..55a95c9
--- /dev/null
+++ b/src/components/Map.js
@@ -0,0 +1,12 @@
+import React from "react";
+import { Image, Flex } from "theme-ui";
+
+function Map({ imageSource }) {
+ return (
+
+
+
+ );
+}
+
+export default Map;
diff --git a/src/components/Party.js b/src/components/Party.js
index e3f267d..6d5674e 100644
--- a/src/components/Party.js
+++ b/src/components/Party.js
@@ -6,9 +6,13 @@ import PartyVideo from "./PartyVideo";
function Party({ streams, localStreamId }) {
return (
-
+
{Object.entries(streams).map(([id, stream]) => (
-
+
))}
);
diff --git a/src/components/PartyVideo.js b/src/components/PartyVideo.js
index d835b66..8708257 100644
--- a/src/components/PartyVideo.js
+++ b/src/components/PartyVideo.js
@@ -9,7 +9,14 @@ function PartyVideo({ stream, muted }) {
}
}, [stream]);
- return ;
+ return (
+
+ );
}
export default PartyVideo;
diff --git a/src/components/Tokens.js b/src/components/Tokens.js
new file mode 100644
index 0000000..6a4e7a0
--- /dev/null
+++ b/src/components/Tokens.js
@@ -0,0 +1,8 @@
+import React from "react";
+import { Box } from "theme-ui";
+
+function Tokens() {
+ return ;
+}
+
+export default Tokens;
diff --git a/src/routes/Game.js b/src/routes/Game.js
index 854662d..5ba0a29 100644
--- a/src/routes/Game.js
+++ b/src/routes/Game.js
@@ -5,13 +5,16 @@ import React, {
useRef,
useCallback
} from "react";
-import { Container, Box, Image, Input, Flex, Heading } from "theme-ui";
+import { Container, Box, Image, Input, Flex, Heading, Grid } from "theme-ui";
import GameContext from "../contexts/GameContext";
import useSession from "../helpers/useSession";
import Token from "../components/Token";
import Party from "../components/Party";
+import Tokens from "../components/Tokens";
+import Map from "../components/Map";
+import AddMapButton from "../components/AddMapButton";
function Game() {
const { gameId } = useContext(GameContext);
@@ -31,7 +34,7 @@ function Game() {
const [imageSource, setImageSource] = useState(null);
const imageDataRef = useRef(null);
- function handleImageChange(event) {
+ function handleMapChange(event) {
imageDataRef.current = event.target.files[0];
setImageSource(URL.createObjectURL(imageDataRef.current));
for (let connection of Object.values(connections)) {
@@ -70,25 +73,25 @@ function Game() {
}
return (
-
-
- {peerId ? peerId : "Loading"}
-
-
-
+
+
+
+
+
+
+
+
+ {/* */}
-
-
-
-
-
-
+
);
}
diff --git a/src/routes/Home.js b/src/routes/Home.js
index 808a8fd..ac9500a 100644
--- a/src/routes/Home.js
+++ b/src/routes/Home.js
@@ -17,8 +17,14 @@ function Home() {
}
return (
-
-
+
+
diff --git a/src/routes/Join.js b/src/routes/Join.js
index c9f288f..70acd8f 100644
--- a/src/routes/Join.js
+++ b/src/routes/Join.js
@@ -1,6 +1,6 @@
import React, { useContext } from "react";
import { navigate } from "hookrouter";
-import { Container, Box, Label, Input, Button } from "theme-ui";
+import { Container, Box, Label, Input, Button, Flex } from "theme-ui";
import GameContext from "../contexts/GameContext";
@@ -17,18 +17,26 @@ function Join() {
}
return (
-
-
-
-
-
-
+
+
+
+
+
+
+
+
);
}