refacto : classification panel

This commit is contained in:
GuillaumeSD
2024-04-06 02:36:29 +02:00
parent 7a6bce6b24
commit 5eb1c3c7f5
7 changed files with 37 additions and 23 deletions

View File

@@ -0,0 +1,31 @@
import { Divider, Grid } from "@mui/material";
import MovesPanel from "./movesPanel";
import MovesClassificationsRecap from "./movesClassificationsRecap";
import { useAtomValue } from "jotai";
import { gameAtom } from "../../states";
export default function ClassificationPanel() {
const game = useAtomValue(gameAtom);
if (!game.history().length) return null;
return (
<>
<Divider sx={{ marginX: "5%" }} />
<Grid
container
item
justifyContent="center"
alignItems="start"
height="100%"
minHeight={{ lg: "50px", xs: undefined }}
sx={{ overflow: "hidden" }}
>
<MovesPanel />
<MovesClassificationsRecap />
</Grid>
</>
);
}