diff --git a/apps/web/app/(landing)/Navbar.tsx b/apps/web/app/(landing)/Navbar.tsx index 2ec3c2d7..01305abb 100644 --- a/apps/web/app/(landing)/Navbar.tsx +++ b/apps/web/app/(landing)/Navbar.tsx @@ -30,7 +30,7 @@ export const Navbar = () => { useMotionValueEvent(scrollYProgress, "change", (current) => { // Check if current is not undefined and is a number if (typeof current === "number") { - let direction = current! - scrollYProgress.getPrevious()!; + const direction = current - scrollYProgress.getPrevious()!; if (direction < 0) { setVisible(true); } else { @@ -43,17 +43,18 @@ export const Navbar = () => {