service last section updated
This commit is contained in:
commit
61cb990414
@ -9,7 +9,7 @@ const BackToTop = () => {
|
|||||||
const handleScroll = () => {
|
const handleScroll = () => {
|
||||||
const scroll = window.scrollY;
|
const scroll = window.scrollY;
|
||||||
const height = document.documentElement.scrollHeight - window.innerHeight;
|
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);
|
setProgress(progressValue);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user