[mod] 小改 ㄏㄏ

This commit is contained in:
建喵 2024-05-13 14:50:38 +08:00
parent 1058da84e0
commit 1fffabfae8
2 changed files with 12 additions and 3 deletions

View File

@ -5,6 +5,11 @@
<meta charset="UTF-8" />
<link rel="icon" href="./favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta content="#000000" name="theme-color" />
<meta name="description" content="歡迎加入羽球團" />
<meta property="og:title" content="羽球團">
<meta property="og:description" content="歡迎加入羽球團">
<meta property="og:image" content="https://i.imgur.com/fGu5riH.png">
<title>羽球團</title>
</head>

View File

@ -9,10 +9,11 @@ export default function Play() {
const navigate: NavigateFunction = useNavigate();
const { id } = useParams();
const [data, setData] = useState<any>(null)
const [team, setTeam] = useState<string[]>([])
const [time, setTime] = useState<string>("")
const [winTeam, setWinTeam] = useState<string>("")
const [score, setScore] = useState<string>("")
const [scoreList, setScoreList] = useState([])
const [team, setTeam] = useState<string[]>([])
const [scoreList, setScoreList] = useState<any[]>([])
function onClickLobby(): void {
navigate(`/`);
@ -35,7 +36,6 @@ export default function Play() {
axios.request(config)
.then((response) => {
// console.log(JSON.stringify(response.data));
const data: any = response.data[0];
setData(data);
document.title = dayjs(data.time * 1000).format("YYYY-MM-DD HH:mm:ss")
@ -53,6 +53,7 @@ export default function Play() {
const team: string[] = JSON.parse(data.team).flat();
const winTeam: string[] = JSON.parse(data.team)[win];
const scoreList: number[] = JSON.parse(data.scoreList);
setTime(dayjs(data.time * 1000).format("YYYY-MM-DD HH:mm:ss"));
setTeam(team);
setWinTeam(winTeam[0] + "、" + winTeam[1]);
setScore(score[0] + "" + score[1]);
@ -69,6 +70,9 @@ export default function Play() {
<tr>
<td colSpan={7} style={{ textAlign: "center" }}><h3>{team[0]}{team[1]} vs {team[2]}{team[3]}</h3></td>
</tr>
<tr>
<td colSpan={7} style={{ textAlign: "center" }}><h3>{time}</h3></td>
</tr>
</thead>
<thead>
<tr>