fix
This commit is contained in:
@@ -3,8 +3,6 @@ import React from "react";
|
|||||||
import {useNavigate, useParams} from "react-router";
|
import {useNavigate, useParams} from "react-router";
|
||||||
import {GHButton} from "../components/Button";
|
import {GHButton} from "../components/Button";
|
||||||
import useTitle from "../../utils/hooks/TitleHook";
|
import useTitle from "../../utils/hooks/TitleHook";
|
||||||
import Hand from "../components/Hand";
|
|
||||||
import Deck from "../components/Deck";
|
|
||||||
import Game from "../components/Game";
|
import Game from "../components/Game";
|
||||||
|
|
||||||
interface GameState {
|
interface GameState {
|
||||||
@@ -69,23 +67,23 @@ const Room = () => {
|
|||||||
const handleCardSend = (card: string) => {
|
const handleCardSend = (card: string) => {
|
||||||
handleSend({
|
handleSend({
|
||||||
Type: "GAME",
|
Type: "GAME",
|
||||||
Payload: {
|
Payload: JSON.stringify({
|
||||||
Action: "PLAYCARD",
|
Action: "PLAYCARD",
|
||||||
Data: JSON.stringify({
|
Data: JSON.stringify({
|
||||||
CardType: card.split(' ')[0],
|
CardType: card.split(' ')[0],
|
||||||
CardValue: card.split(' ')[1]
|
CardValue: card.split(' ')[1]
|
||||||
})
|
})
|
||||||
}
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleDraw = () => {
|
const handleDraw = () => {
|
||||||
handleSend({
|
handleSend({
|
||||||
Type: "GAME",
|
Type: "GAME",
|
||||||
Payload: {
|
Payload: JSON.stringify({
|
||||||
Action: "DRAW",
|
Action: "DRAW",
|
||||||
Data: ""
|
Data: ""
|
||||||
}
|
})
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user