From ed0782b0f9d83bc1b2a5463a360084624c1c3db8 Mon Sep 17 00:00:00 2001
From: Joni Laukka <joni.laukka.overflow@gmail.com>
Date: Mon, 1 Jul 2019 16:23:44 +0300
Subject: [PATCH] pohjaa

---
 public/index.html              |  1 +
 src/components/JoinGameForm.js | 16 ++++++++++++++++
 2 files changed, 17 insertions(+)
 create mode 100644 src/components/JoinGameForm.js

diff --git a/public/index.html b/public/index.html
index 960acce..8b2f9d1 100644
--- a/public/index.html
+++ b/public/index.html
@@ -24,6 +24,7 @@
   <body>
     <noscript>You need to enable JavaScript to run this app.</noscript>
     <div id="root"></div>
+    <div id="form"></div>
     <!--
       This HTML file is a template.
       If you open it directly in the browser, you will see an empty page.
diff --git a/src/components/JoinGameForm.js b/src/components/JoinGameForm.js
new file mode 100644
index 0000000..b620482
--- /dev/null
+++ b/src/components/JoinGameForm.js
@@ -0,0 +1,16 @@
+import React from "react";
+import ReactDOM from "react-dom"
+
+export default class JoinGameForm extends React.Component{
+  render(){
+    if(this.props.game === null){return false;}
+
+    return ReactDOM.createPortal(
+      <div className="fade-main">
+        <label>{this.props.game.name}</label>
+        <div>{this.props.game.desc}</div>
+      </div>,
+      document.getElementById('form')
+    );
+  }
+}
\ No newline at end of file
-- 
GitLab