service last section updated

This commit is contained in:
Selvi 2026-03-16 20:37:02 +05:30
commit 61cb990414

View File

@ -9,7 +9,7 @@ const BackToTop = () => {
const handleScroll = () => {
const scroll = window.scrollY;
const height = document.documentElement.scrollHeight - window.innerHeight;
const progressValue = 307.919 - (scroll * 307.919 / height);
const progressValue = height > 0 ? (307.919 - (scroll * 307.919 / height)) : 307.919;
setProgress(progressValue);