Remove locale switch jump from header nav
CI / quality (push) Waiting to run

This commit is contained in:
MOH
2026-03-10 18:11:39 +01:00
parent 4b86e9cb2c
commit 743f6746e0
+5 -6
View File
@@ -84,11 +84,7 @@ function NavLinks({
onClick={onNavigate} onClick={onNavigate}
> >
{isActive ? ( {isActive ? (
<motion.span <span className="absolute inset-0 -z-10 rounded-pill bg-primary shadow-xs" />
layoutId={`site-header-active-tab-${locale}`}
className="absolute inset-0 -z-10 rounded-pill bg-primary shadow-xs"
transition={{ type: "spring", stiffness: 380, damping: 30 }}
/>
) : null} ) : null}
{t(item.key)} {t(item.key)}
</Link> </Link>
@@ -233,7 +229,10 @@ export function SiteHeader({
initial={false} initial={false}
animate={isScrolled ? { y: -1, scale: 0.985 } : { y: 0, scale: 1 }} animate={isScrolled ? { y: -1, scale: 0.985 } : { y: 0, scale: 1 }}
transition={reducedMotion ? { duration: 0 } : { duration: 0.3, ease: [0.22, 1, 0.36, 1] }} transition={reducedMotion ? { duration: 0 } : { duration: 0.3, ease: [0.22, 1, 0.36, 1] }}
className="inline-flex min-w-[31rem] items-center justify-center gap-1 rounded-pill border border-border/70 bg-background/80 p-1.5 backdrop-blur-chrome" className={cn(
"inline-flex items-center gap-1 rounded-pill border border-border/70 bg-background/80 p-1.5 backdrop-blur-chrome",
isArabic ? "w-auto max-w-none" : "min-w-[27rem] max-w-[42rem]",
)}
> >
<NavLinks /> <NavLinks />
</motion.nav> </motion.nav>