From 87e3e6bf66dc18a324417e05043874792749a8c5 Mon Sep 17 00:00:00 2001 From: MikunoNaka Date: Wed, 21 Jul 2021 19:43:33 +0530 Subject: Fixed styling and add prompt for player --- package.json | 2 + src/components/App.tsx | 5 +- src/components/Grid.tsx | 9 ++- src/components/ScoreBoard.tsx | 10 ++- src/components/style.css | 51 ++++++++++--- yarn.lock | 163 +++++++++++++++++++++++++++++++++++++++++- 6 files changed, 218 insertions(+), 22 deletions(-) diff --git a/package.json b/package.json index 05ace5d..37f39c2 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,8 @@ "react": "^17.0.2", "react-dom": "^17.0.2", "react-scripts": "4.0.3", + "socket.io": "^4.1.3", + "socket.io-client": "^4.1.3", "typescript": "^4.1.2", "web-vitals": "^1.0.1" }, diff --git a/src/components/App.tsx b/src/components/App.tsx index 141b332..6a9c60e 100644 --- a/src/components/App.tsx +++ b/src/components/App.tsx @@ -26,13 +26,14 @@ import './style.css'; const App: React.FC = () => { const [scoreX, setScoreX] = useState(0); const [scoreO, setScoreO] = useState(0); + const [turn, setTurn] = useState(0); const [showMessageBox, setShowMessageBox] = useState(false); const [message, setMessage] = useState(""); return ( <> {showMessageBox && } - - + +