diff --git a/.env b/.env index 7751623..b35bba8 100644 --- a/.env +++ b/.env @@ -1,5 +1,5 @@ VITE_ENVIRONMENT=dev VITE_BACKEND_URL=https://skyjo-backend.voltvector.org -#VITE_ENVIRONMENT=local -#VITE_BACKEND_URL=http://localhost:3001 \ No newline at end of file +VITE_ENVIRONMENT=local +VITE_BACKEND_URL=http://localhost:3001 \ No newline at end of file diff --git a/src/App.tsx b/src/App.tsx index 33c5d66..144661d 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -3,7 +3,7 @@ import { socket } from "./socket"; import GameCanvas from "./components/GameCanvas"; import { Footer } from "./components/Footer"; -import { JoinSession } from "./components/JoinSession"; +import { SessionManager } from "./components/SessionManager"; import { Game } from "./types/gameTypes"; import MessageDisplay from "./components/MessageDisplay"; @@ -72,8 +72,9 @@ export default function App() { return (
{!gameData && ( - )}
diff --git a/src/components/Footer.tsx b/src/components/Footer.tsx index ac091d3..7d5a518 100644 --- a/src/components/Footer.tsx +++ b/src/components/Footer.tsx @@ -1,4 +1,4 @@ -import { FC } from "react"; +import { Dispatch, FC, SetStateAction } from "react"; import { socket } from "../socket"; import Text from "../global/Text"; @@ -11,6 +11,8 @@ type Footer = { clientsInRoom: number; playerData: Player[]; showNextGameButton: boolean; + setClientsInRoom: Dispatch>; + setSession: Dispatch>; }; // TODO: use clients in room to validate player count @@ -20,11 +22,19 @@ export const Footer: FC