feat : eval bar value on win percentage
This commit is contained in:
@@ -25,9 +25,9 @@ export default function EvaluationBar({ height }: Props) {
|
||||
|
||||
useEffect(() => {
|
||||
const bestLine = position?.eval?.lines[0];
|
||||
if (!bestLine || bestLine.depth < 6) return;
|
||||
if (!position.eval || !bestLine || bestLine.depth < 6) return;
|
||||
|
||||
const evalBar = getEvaluationBarValue(bestLine, isWhiteToPlay);
|
||||
const evalBar = getEvaluationBarValue(position.eval);
|
||||
setEvalBar(evalBar);
|
||||
}, [position, isWhiteToPlay]);
|
||||
|
||||
|
||||
@@ -40,8 +40,10 @@ const SquareRenderer = forwardRef<HTMLDivElement, CustomSquareProps>(
|
||||
height={40}
|
||||
style={{
|
||||
position: "absolute",
|
||||
top: -15,
|
||||
right: -15,
|
||||
top: "max(-15px, -1.8vw)",
|
||||
right: "max(-15px, -1.8vw)",
|
||||
maxWidth: "3.6vw",
|
||||
maxHeight: "3.6vw",
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user