File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -118,17 +118,17 @@ export const Highlight: React.FC<Props> = ({
118118 }
119119
120120 // Track whether description exists (not its content)
121- const hasDescriptionRef = useRef ( boardDescription . segments . length > 0 )
121+ const hasDescriptionRef = useRef ( boardDescription ? .segments ? .length > 0 )
122122 const [ animationKey , setAnimationKey ] = useState ( 0 )
123123
124124 useEffect ( ( ) => {
125- const descriptionNowExists = boardDescription . segments . length > 0
125+ const descriptionNowExists = boardDescription ? .segments ? .length > 0
126126 // Only trigger animation when presence changes (exists vs doesn't exist)
127127 if ( hasDescriptionRef . current !== descriptionNowExists ) {
128128 hasDescriptionRef . current = descriptionNowExists
129129 setAnimationKey ( ( prev ) => prev + 1 )
130130 }
131- } , [ boardDescription . segments . length ] )
131+ } , [ boardDescription ? .segments ? .length ] )
132132
133133 return (
134134 < div
@@ -272,7 +272,7 @@ export const Highlight: React.FC<Props> = ({
272272 </ div >
273273 < div className = "flex flex-col items-start justify-start bg-background-1/80 p-2 text-sm" >
274274 < AnimatePresence mode = "wait" >
275- { boardDescription . segments . length > 0 ? (
275+ { boardDescription ? .segments ? .length > 0 ? (
276276 < motion . div
277277 key = { animationKey }
278278 initial = { { opacity : 0 , y : 10 } }
Original file line number Diff line number Diff line change @@ -725,7 +725,7 @@ const OpeningsPage: NextPage = () => {
725725 Analyzing Your Performance
726726 </ h3 >
727727 < p className = "text-sm text-secondary" >
728- Running deep analysis with Stockfish and Maia...
728+ Running analysis with Stockfish and Maia...
729729 </ p >
730730 </ div >
731731 </ div >
You can’t perform that action at this time.
0 commit comments