diff --git a/components/reading-progress.tsx b/components/reading-progress.tsx index 5dd3900..62d11af 100644 --- a/components/reading-progress.tsx +++ b/components/reading-progress.tsx @@ -1,6 +1,7 @@ 'use client'; import { useEffect, useState } from 'react'; +import { createPortal } from 'react-dom'; export function ReadingProgress() { const [mounted, setMounted] = useState(false); @@ -29,19 +30,21 @@ export function ReadingProgress() { return () => window.removeEventListener('scroll', handleScroll); }, [mounted]); + if (!mounted) return null; - return ( -