1
Fork 0
This repository has been archived on 2024-10-07. You can view files and clone it, but cannot push or open issues or pull requests.
tic-tac-toe/src/app.jsx
2024-06-04 22:16:26 +04:00

15 lines
467 B
JavaScript

import MainMenu from "./mainMenu";
import Game from "./game";
import { useStore } from "./store";
export default () => {
const isGameRunning = useStore((state) => state.isGameRunning);
const gameKey = useStore((state) => state.gameKey);
const players = useStore((state) => state.players);
return (
<main className="center min-h-screen bg-navy-700 p-6">
{isGameRunning ? <Game players={players} key={gameKey} /> : <MainMenu />}
</main>
);
};