diff options
| author | Dhravya Shah <[email protected]> | 2024-08-24 13:55:37 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-08-24 13:55:37 -0700 |
| commit | 2fa2daa6d88efdb8c5bcd15de74e20278859984c (patch) | |
| tree | b2bce300477f9c58c044d054be24e7d88f180d04 | |
| parent | Merge pull request #255 from aidenybai/chore/upgrade-million (diff) | |
| parent | fix: navbar glitch (diff) | |
| download | supermemory-2fa2daa6d88efdb8c5bcd15de74e20278859984c.tar.xz supermemory-2fa2daa6d88efdb8c5bcd15de74e20278859984c.zip | |
Merge pull request #258 from manuarora700/main
| -rw-r--r-- | apps/web/app/(landing)/Navbar.tsx | 9 |
1 files changed, 5 insertions, 4 deletions
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 = () => { <AnimatePresence mode="wait"> <motion.nav initial={{ - y: -130, + y: -150, opacity: 1, }} animate={{ - y: visible ? 0 : -100, + y: visible ? -50 : -100, opacity: visible ? 1 : 0, }} transition={{ duration: 0.2, + ease: "easeOut", }} - className="fixed top-0 z-[99999] mt-12 hidden w-full px-24 text-sm md:flex" + className="fixed z-[99999] inset-x-0 mt-12 hidden w-full px-24 text-sm md:flex" > <NavbarContent /> </motion.nav> |