|
@@ -4,11 +4,11 @@ class PreRound extends React.Component {
|
|
|
copyGameId() {
|
|
|
const { gameId } = this.props;
|
|
|
const textarea = this.textarea;
|
|
|
- textarea.value = gameId;
|
|
|
+ textarea.value = gameId;
|
|
|
textarea.select();
|
|
|
document.execCommand("copy");
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
render() {
|
|
|
const { gameId, playerName, onStart } = this.props;
|
|
|
return (
|
|
@@ -18,14 +18,14 @@ class PreRound extends React.Component {
|
|
|
Game Code: {gameId} <button onClick={() => this.copyGameId()}>Copy</button>
|
|
|
</p>
|
|
|
<button onClick={onStart}>Start Game</button>
|
|
|
- <textarea
|
|
|
- ref={textarea => this.textarea = textarea}
|
|
|
- style={{ position: "absolute", top: "-1000px" }}
|
|
|
- />
|
|
|
+ <textarea
|
|
|
+ ref={textarea => this.textarea = textarea}
|
|
|
+ style={{ position: "absolute", top: "-1000px" }}
|
|
|
+ />
|
|
|
</div>
|
|
|
- );
|
|
|
+ );
|
|
|
+ }
|
|
|
}
|
|
|
-}
|
|
|
|
|
|
-export default PreRound;
|
|
|
+ export default PreRound;
|
|
|
|