From ef60bbeb9670d9545829782d6466b62e5fe3accc Mon Sep 17 00:00:00 2001 From: Saurabh Kumar Bajpai Date: Sat, 6 Jun 2026 15:26:27 +0530 Subject: [PATCH] feat: show scroll progress on quiz pages --- app/components/ProgressBar.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/components/ProgressBar.tsx b/app/components/ProgressBar.tsx index f2a421d..d75c46f 100644 --- a/app/components/ProgressBar.tsx +++ b/app/components/ProgressBar.tsx @@ -8,6 +8,7 @@ export default function ProgressBar() { const [scrollPercentage, setScrollPercentage] = useState(0); const [showBackToTop, setShowBackToTop] = useState(false); const pathname = usePathname(); + const showScrollProgress = pathname.startsWith('/sem') || pathname.startsWith('/quiz/'); useEffect(() => { const handleScroll = () => { @@ -39,7 +40,7 @@ export default function ProgressBar() { return ( <> - {pathname.startsWith('/sem') && ( + {showScrollProgress && (
); -} \ No newline at end of file +}