lainTSX/src/App.tsx

27 lines
666 B
TypeScript
Raw Normal View History

2020-08-31 15:08:27 +00:00
import React, { useEffect, useState } from "react";
import Game from "./components/Game";
import "./static/css/hub.css";
2020-08-31 15:08:27 +00:00
import "./static/css/main.css";
const App = () => {
const [moveToGame, setMoveToGame] = useState(false);
useEffect(() => {
document.title = "< index >";
document.getElementsByTagName("body")[0].className = "main-body";
return () => {
document.getElementsByTagName("body")[0].className = "";
};
}, []);
return (
<div id="game-root" className="game">
{/* {moveToGame ? <Game /> : <Intro setMoveToGame={setMoveToGame} />} */}
{/* <Intro /> */}
<Game />
</div>
);
};
export default App;