Commit 67c6710f authored by Chunchi Che's avatar Chunchi Che

code fmt

parent d2df30c2
import React, { useState, ChangeEvent} from "react";
import {Link} from "react-router-dom";
import React, { useState, ChangeEvent } from "react";
import { Link } from "react-router-dom";
export default function JoinRoom() {
const [player, setPlayer] = useState("");
const [passWd, setPasswd] = useState("");
const [ip, setIp] = useState("")
const [ip, setIp] = useState("");
let handlePlayerChange = (event: ChangeEvent<HTMLInputElement>) => {
setPlayer(event.target.value);
......@@ -13,8 +13,8 @@ export default function JoinRoom() {
setPasswd(event.target.value);
};
let handleIpChange = (event: ChangeEvent<HTMLInputElement>) => {
setIp(event.target.value)
}
setIp(event.target.value);
};
return (
<div>
......
import React from "react";
import {useParams} from "react-router-dom";
import { useParams } from "react-router-dom";
export default function WaitRoom() {
const params = useParams<{
player: string,
passWd: string,
ip: string
player: string;
passWd: string;
ip: string;
}>();
return (<div>
<p>player: {params.player}</p>
<p>passwd: {params.passWd}</p>
<p>ip: {params.ip}</p>
</div>);
return (
<div>
<p>player: {params.player}</p>
<p>passwd: {params.passWd}</p>
<p>ip: {params.ip}</p>
</div>
);
}
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