Squashed commit of the following:
commit 933ba823d5f991b9ab1f66bd94262c181e9d0267 Author: GuillaumeSD <gsd.lfny@gmail.com> Date: Mon Apr 21 20:13:37 2025 +0200 fix : new chessjs version commit b9376bcbc718f6eaa9a0fd9caada6b957f73b85a Author: GuillaumeSD <gsd.lfny@gmail.com> Date: Mon Apr 21 19:34:12 2025 +0200 chore : chessjs bump version
This commit is contained in:
@@ -8,7 +8,9 @@ export default function GamePanel() {
|
||||
const game = useAtomValue(gameAtom);
|
||||
const gameHeaders = game.getHeaders();
|
||||
|
||||
const hasGameInfo = gameFromUrl !== undefined || !!gameHeaders.White;
|
||||
const hasGameInfo =
|
||||
gameFromUrl !== undefined ||
|
||||
(!!gameHeaders.White && gameHeaders.White !== "?");
|
||||
|
||||
if (!hasGameInfo) return null;
|
||||
|
||||
|
||||
@@ -49,7 +49,10 @@ export default function LoadGame() {
|
||||
loadGame();
|
||||
}, [gameFromUrl, game, resetAndSetGamePgn, setEval]);
|
||||
|
||||
const isGameLoaded = gameFromUrl !== undefined || !!game.getHeaders().White;
|
||||
const isGameLoaded =
|
||||
gameFromUrl !== undefined ||
|
||||
(!!game.getHeaders().White && game.getHeaders().White !== "?") ||
|
||||
game.history().length > 0;
|
||||
|
||||
if (evaluationProgress) return null;
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ export default function PanelToolBar() {
|
||||
|
||||
const boardHistory = board.history();
|
||||
const game = useAtomValue(gameAtom);
|
||||
|
||||
useEffect(() => {
|
||||
const onKeyDown = (e: KeyboardEvent) => {
|
||||
if (boardHistory.length === 0) return;
|
||||
|
||||
Reference in New Issue
Block a user