back to top correctin are updated
This commit is contained in:
parent
4405fab34d
commit
6bc01cb3df
@ -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);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user