fix : show live eval when depth is > 6
This commit is contained in:
@@ -17,7 +17,7 @@ export default function LineEvaluation({ line }: Props) {
|
||||
? `Mate in ${Math.abs(line.mate)}`
|
||||
: "?";
|
||||
|
||||
const showSkeleton = line.depth === 0;
|
||||
const showSkeleton = line.depth < 6;
|
||||
|
||||
return (
|
||||
<ListItem disablePadding>
|
||||
@@ -38,7 +38,7 @@ export default function LineEvaluation({ line }: Props) {
|
||||
|
||||
<Typography>
|
||||
{showSkeleton ? (
|
||||
<Skeleton width={"30em"} variant="rounded" animation="wave" />
|
||||
<Skeleton width={"20em"} variant="rounded" animation="wave" />
|
||||
) : (
|
||||
line.pv.slice(0, 10).map(moveLineUciToSan(board.fen())).join(", ")
|
||||
)}
|
||||
|
||||
@@ -24,7 +24,7 @@ export default function ReviewPanelBody() {
|
||||
(_, i) => ({ pv: [`${i}`], depth: 0, multiPv: i + 1 })
|
||||
);
|
||||
|
||||
const engineLines = move?.eval?.lines.length
|
||||
const engineLines = move?.eval?.lines?.length
|
||||
? move.eval.lines
|
||||
: linesSkeleton;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user