Commit d32a9bf4 authored by Chunchi Che's avatar Chunchi Che Committed by GitHub

Merge pull request #13 from DarkNeos/dev

Dev
parents 66f0bdaf 7afc3b00
.App {
text-align: center;
}
.App-logo {
height: 40vmin;
pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
.App-logo {
animation: App-logo-spin infinite 20s linear;
}
}
.App-header {
background-color: #282c34;
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: calc(10px + 2vmin);
color: white;
}
.App-link {
color: #61dafb;
}
@keyframes App-logo-spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
import React from "react";
import "./App.css";
import JoinRoom from "./JoinRoom";
import WaitRoom from "./WaitRoom";
import ThreeJs from "./ThreeJs";
......
import React, { useState, ChangeEvent } from "react";
import { Link } from "react-router-dom";
import "./css/WaitRoom.css";
export default function JoinRoom() {
const [player, setPlayer] = useState("");
......@@ -19,6 +20,7 @@ export default function JoinRoom() {
return (
<div>
<p>
<label>player: </label>
<input
type="text"
title="player"
......@@ -27,6 +29,7 @@ export default function JoinRoom() {
></input>
</p>
<p>
<label>addr: </label>
<input
type="text"
title="ip"
......@@ -35,6 +38,7 @@ export default function JoinRoom() {
></input>
</p>
<p>
<label>passwd: </label>
<input
type="text"
title="passwd"
......@@ -42,9 +46,11 @@ export default function JoinRoom() {
onChange={handlePasswdChange}
></input>
</p>
<p>
<button>
<Link to={{ pathname: `/${player}/${passWd}/${ip}` }}>join</Link>
</button>
</p>
</div>
);
}
body {
margin: 0;
justify-content: center;
}
div {
margin: auto;
padding: 10%;
}
p {
text-align: center;
}
body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen",
"Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue",
sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
code {
font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New",
monospace;
}
import React from "react";
import ReactDOM from "react-dom/client";
import "./index.css";
import App from "./App";
import reportWebVitals from "./reportWebVitals";
import { BrowserRouter } from "react-router-dom";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment