feat : undo last played move
This commit is contained in:
@@ -3,6 +3,7 @@ import { useAtom, useAtomValue } from "jotai";
|
||||
import { gameAtom, isGameInProgressAtom } from "./states";
|
||||
import { useEffect } from "react";
|
||||
import { playGameEndSound } from "@/lib/sounds";
|
||||
import UndoMoveButton from "./undoMoveButton";
|
||||
|
||||
export default function GameInProgress() {
|
||||
const game = useAtomValue(gameAtom);
|
||||
@@ -40,14 +41,11 @@ export default function GameInProgress() {
|
||||
<CircularProgress size={20} color="info" />
|
||||
</Grid>
|
||||
|
||||
<Grid
|
||||
item
|
||||
container
|
||||
justifyContent="center"
|
||||
alignItems="center"
|
||||
xs={12}
|
||||
gap={2}
|
||||
>
|
||||
<Grid item container justifyContent="center" alignItems="center" xs={12}>
|
||||
<UndoMoveButton />
|
||||
</Grid>
|
||||
|
||||
<Grid item container justifyContent="center" alignItems="center" xs={12}>
|
||||
<Button variant="outlined" onClick={handleResign}>
|
||||
Resign
|
||||
</Button>
|
||||
|
||||
Reference in New Issue
Block a user