aboutsummaryrefslogtreecommitdiff
path: root/components/layout.js
diff options
context:
space:
mode:
authorFactiven <[email protected]>2023-05-25 22:56:21 +0700
committerGitHub <[email protected]>2023-05-25 22:56:21 +0700
commit8dcb5cb96819547e574d4ca619c54c6f902b8860 (patch)
tree492e9147c106d7ddb7706c7ba2127f6d04ac49ce /components/layout.js
parentUpdate videoPlayer.js (diff)
downloadmoopa-8dcb5cb96819547e574d4ca619c54c6f902b8860.tar.xz
moopa-8dcb5cb96819547e574d4ca619c54c6f902b8860.zip
Update v3.6.1
> Added Thumbnail to info page > Temporarily removed Manga from website until the page is finished
Diffstat (limited to 'components/layout.js')
-rw-r--r--components/layout.js5
1 files changed, 1 insertions, 4 deletions
diff --git a/components/layout.js b/components/layout.js
index bc55860..49850c9 100644
--- a/components/layout.js
+++ b/components/layout.js
@@ -9,11 +9,8 @@ function Layout(props) {
useEffect(() => {
const handleScroll = () => {
const scrollY = window.scrollY;
- const bodyHeight = document.body.offsetHeight;
- const windowHeight = window.innerHeight;
- const scrollPercent = (scrollY / (bodyHeight - windowHeight)) * 100;
- if (scrollPercent <= 20) {
+ if (scrollY <= 200) {
setIsAtTop(true);
setIsScrollingDown(false);
} else if (scrollY > lastScrollY) {