mirror of
https://github.com/DerTyp7/dertyp7.github.io.git
synced 2025-10-29 12:52:08 +01:00
Update scroll threshold in ScrollToTop component
This commit is contained in:
@@ -5,7 +5,7 @@ export default function ScrollToTop() {
|
|||||||
const [isScrolledUp, setIsScrolledUp] = useState(false);
|
const [isScrolledUp, setIsScrolledUp] = useState(false);
|
||||||
|
|
||||||
const toggleVisibilityAndDirection = () => {
|
const toggleVisibilityAndDirection = () => {
|
||||||
if (window.scrollY < 150) {
|
if (window.scrollY < 100) {
|
||||||
setIsScrolledUp(false);
|
setIsScrolledUp(false);
|
||||||
} else {
|
} else {
|
||||||
setIsScrolledUp(window.scrollY === 0 ? false : true);
|
setIsScrolledUp(window.scrollY === 0 ? false : true);
|
||||||
|
|||||||
Reference in New Issue
Block a user