import React from "react";
import { Socket } from "socket.io-client";
import LandingPage from "./pages/landing/LandingPage";
import GamePage from "./pages/game/GamePage";
import LobbyPage from "./pages/lobby/LobbyPage";

export interface AppProps {
  socket: Socket;
}

const App = (props: AppProps) => {
  const renderedPage: string = "GAME";

  return (
    <div className="app">
      {renderedPage === "LANDING" && <LandingPage {...props} />}
      {renderedPage === "LOBBY" && <LobbyPage />}
      {renderedPage === "GAME" && <GamePage />}
    </div>
  );
};

export default App;
