diff --git a/website/src/components/marketing/NotFoundPage.tsx b/website/src/components/marketing/NotFoundPage.tsx index e98a5fb5a8..117a4c3df1 100644 --- a/website/src/components/marketing/NotFoundPage.tsx +++ b/website/src/components/marketing/NotFoundPage.tsx @@ -26,11 +26,14 @@ const BouncingPill = () => { const velocityRef = useRef({ x: 0.4, y: 0.25 }); useEffect(() => { - let animationFrameId: number; + let animationFrameId: number = 0; let lastTime = 0; + let isMounted = true; const targetInterval = 30; // ms between updates const animate = (currentTime: number) => { + if (!isMounted) return; + if (!containerRef.current || !pillRef.current) { animationFrameId = requestAnimationFrame(animate); return; @@ -77,7 +80,10 @@ const BouncingPill = () => { }; animationFrameId = requestAnimationFrame(animate); - return () => cancelAnimationFrame(animationFrameId); + return () => { + isMounted = false; + cancelAnimationFrame(animationFrameId); + }; }, []); return ( diff --git a/website/src/images/thinking/0000405625_OG.JPG b/website/src/images/thinking/0000405625_OG.JPG index f29693247d..fb3a34dcf7 100644 Binary files a/website/src/images/thinking/0000405625_OG.JPG and b/website/src/images/thinking/0000405625_OG.JPG differ diff --git a/website/src/pages/index.astro b/website/src/pages/index.astro index 7a6af60ef7..ba14b1e50a 100644 --- a/website/src/pages/index.astro +++ b/website/src/pages/index.astro @@ -77,7 +77,7 @@ const latestChangelogTitle = latest?.data.title ?? ''; ---