handling specific gameId
This commit is contained in:
parent
a346de3ad8
commit
c201b7eca9
|
|
@ -1,3 +1,4 @@
|
|||
import { useParams } from "react-router-dom";
|
||||
import { GameContextProvider } from "../context/GameContext.js";
|
||||
|
||||
import GameContainer from "../components/game/GameContainer.jsx";
|
||||
|
|
@ -8,6 +9,8 @@ import GameModal from "../components/game/GameModal.jsx";
|
|||
import AnimatedPage from "../components/AnimatedPage.jsx";
|
||||
|
||||
export default function Game() {
|
||||
const { id } = useParams();
|
||||
const gameId = id || "latest";
|
||||
return (
|
||||
<>
|
||||
<AnimatedPage className='page-container page-container--play'>
|
||||
|
|
@ -16,7 +19,7 @@ export default function Game() {
|
|||
<Logo />
|
||||
<GameModal />
|
||||
<Tutorials />
|
||||
<GameContainer gameId={"latest"} />
|
||||
<GameContainer gameId={gameId} />
|
||||
</div>
|
||||
</GameContextProvider>
|
||||
</AnimatedPage>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user