diff --git a/public/index.html b/public/index.html index 960acce5c2bb3654ab7c92a991308c3c0bba0c81..8b2f9d1cb04b63987cab6a5b0645beb0aeafff57 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 0000000000000000000000000000000000000000..b6204822e45dfdce0fca957763e24d6fceeb44a6 --- /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