Migrate to components
This commit is contained in:
@ -1,13 +1,20 @@
|
||||
import Home from "./pages/Home";
|
||||
import Game from "./pages/Game";
|
||||
import {useContext} from "react";
|
||||
import {StateContext} from "@/common/contexts/StateContext";
|
||||
import {FontAwesomeIcon} from "@fortawesome/react-fontawesome";
|
||||
import {faMusic} from "@fortawesome/free-solid-svg-icons";
|
||||
|
||||
const App = () => {
|
||||
const {currentState} = useContext(StateContext);
|
||||
|
||||
return (
|
||||
<>
|
||||
{currentState === "Home" && <Home />}
|
||||
<div className="background-elements">
|
||||
<FontAwesomeIcon icon={faMusic} className="music-note note-1" />
|
||||
<FontAwesomeIcon icon={faMusic} className="music-note note-2" />
|
||||
<FontAwesomeIcon icon={faMusic} className="music-note note-3" />
|
||||
</div>
|
||||
{currentState === "Home" && <Game />}
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
Reference in New Issue
Block a user