lainTSX/src/App.tsx

30 lines
754 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";
2020-09-07 15:07:26 +00:00
import { Canvas } from "react-three-fiber";
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 /> */}
2020-09-07 15:07:26 +00:00
<Canvas concurrent>
<Game />
</Canvas>
</div>
);
};
export default App;