diff --git a/src/sections/analysis/board/squareRenderer.tsx b/src/sections/analysis/board/squareRenderer.tsx index 5418b60..50229b0 100644 --- a/src/sections/analysis/board/squareRenderer.tsx +++ b/src/sections/analysis/board/squareRenderer.tsx @@ -15,15 +15,15 @@ const SquareRenderer = forwardRef( const toSquare = position.lastMove?.to; const moveClassification = position?.eval?.moveClassification; - const showPlayerMove = moveClassification && showPlayerMoveIcon; - const customSquareStyle: CSSProperties | undefined = - showPlayerMove && (fromSquare === square || toSquare === square) + fromSquare === square || toSquare === square ? { position: "absolute", width: "100%", height: "100%", - backgroundColor: moveClassificationColors[moveClassification], + backgroundColor: moveClassification + ? moveClassificationColors[moveClassification] + : "#ffff33", opacity: 0.5, } : undefined; @@ -32,7 +32,7 @@ const SquareRenderer = forwardRef(
{children} {customSquareStyle &&
} - {showPlayerMove && square === toSquare && ( + {moveClassification && showPlayerMoveIcon && square === toSquare && (