fix(ui): resolve unclosed Link tag in ReferencesSlider and MobileBottomNav type errors
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 32s
Build & Deploy / 🧪 QA (push) Successful in 1m30s
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
Build & Deploy / 🏗️ Build (push) Has been cancelled
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 32s
Build & Deploy / 🧪 QA (push) Successful in 1m30s
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
Build & Deploy / 🏗️ Build (push) Has been cancelled
This commit is contained in:
@@ -159,7 +159,7 @@ export function ReferencesSlider(props: ReferencesSliderProps) {
|
|||||||
</span>
|
</span>
|
||||||
<h4 className="font-heading text-xl md:text-2xl font-bold leading-tight break-words">{ref.title}</h4>
|
<h4 className="font-heading text-xl md:text-2xl font-bold leading-tight break-words">{ref.title}</h4>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</Link>
|
||||||
</motion.div>
|
</motion.div>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
|
|||||||
@@ -4,11 +4,12 @@ import * as React from 'react';
|
|||||||
import { usePathname } from 'next/navigation';
|
import { usePathname } from 'next/navigation';
|
||||||
import { TransitionLink } from '@/components/ui/TransitionLink';
|
import { TransitionLink } from '@/components/ui/TransitionLink';
|
||||||
import { Home, Briefcase, Users, Mail } from 'lucide-react';
|
import { Home, Briefcase, Users, Mail } from 'lucide-react';
|
||||||
import { motion } from 'framer-motion';
|
import { motion, AnimatePresence } from 'framer-motion';
|
||||||
|
|
||||||
export interface NavLink {
|
export interface NavLink {
|
||||||
label: string;
|
label: string;
|
||||||
url: string;
|
url: string;
|
||||||
|
children?: NavLink[];
|
||||||
}
|
}
|
||||||
|
|
||||||
interface MobileBottomNavProps {
|
interface MobileBottomNavProps {
|
||||||
@@ -112,20 +113,8 @@ export function MobileBottomNav({ navLinks, currentLocale }: MobileBottomNavProp
|
|||||||
ItemIcon = <svg className="w-5 h-5 md:w-6 md:h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor" strokeWidth={2.5}><path strokeLinecap="round" strokeLinejoin="round" d="M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z" /></svg>;
|
ItemIcon = <svg className="w-5 h-5 md:w-6 md:h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor" strokeWidth={2.5}><path strokeLinecap="round" strokeLinejoin="round" d="M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z" /></svg>;
|
||||||
}
|
}
|
||||||
|
|
||||||
const LinkWrapper = item.isFlyoutTrigger ? 'button' : TransitionLink;
|
const innerContent = (
|
||||||
const linkProps = item.isFlyoutTrigger
|
<>
|
||||||
? { onClick: () => setIsFlyoutOpen(!isFlyoutOpen), className: "w-full focus:outline-none" }
|
|
||||||
: { href: mappedUrl };
|
|
||||||
|
|
||||||
return (
|
|
||||||
<LinkWrapper
|
|
||||||
key={item.label}
|
|
||||||
{...linkProps}
|
|
||||||
className={`relative flex flex-col items-center justify-center flex-1 h-[60px] transition-colors duration-300 select-none ${
|
|
||||||
isActive ? 'text-white' : 'text-neutral-500 hover:text-neutral-900'
|
|
||||||
} ${item.isFlyoutTrigger ? 'focus:outline-none' : ''}`}
|
|
||||||
style={{ WebkitTapHighlightColor: 'transparent', touchAction: 'manipulation' }}
|
|
||||||
>
|
|
||||||
{isActive && (
|
{isActive && (
|
||||||
<motion.div
|
<motion.div
|
||||||
layoutId="mobile-nav-active-bg"
|
layoutId="mobile-nav-active-bg"
|
||||||
@@ -149,7 +138,35 @@ export function MobileBottomNav({ navLinks, currentLocale }: MobileBottomNavProp
|
|||||||
{item.label}
|
{item.label}
|
||||||
</motion.span>
|
</motion.span>
|
||||||
</div>
|
</div>
|
||||||
</LinkWrapper>
|
</>
|
||||||
|
);
|
||||||
|
|
||||||
|
if (item.isFlyoutTrigger) {
|
||||||
|
return (
|
||||||
|
<button
|
||||||
|
key={item.label}
|
||||||
|
onClick={() => setIsFlyoutOpen(!isFlyoutOpen)}
|
||||||
|
className={`relative flex flex-col items-center justify-center flex-1 h-[60px] transition-colors duration-300 select-none w-full focus:outline-none ${
|
||||||
|
isActive ? 'text-white' : 'text-neutral-500 hover:text-neutral-900'
|
||||||
|
}`}
|
||||||
|
style={{ WebkitTapHighlightColor: 'transparent', touchAction: 'manipulation' }}
|
||||||
|
>
|
||||||
|
{innerContent}
|
||||||
|
</button>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<TransitionLink
|
||||||
|
key={item.label}
|
||||||
|
href={mappedUrl}
|
||||||
|
className={`relative flex flex-col items-center justify-center flex-1 h-[60px] transition-colors duration-300 select-none ${
|
||||||
|
isActive ? 'text-white' : 'text-neutral-500 hover:text-neutral-900'
|
||||||
|
}`}
|
||||||
|
style={{ WebkitTapHighlightColor: 'transparent', touchAction: 'manipulation' }}
|
||||||
|
>
|
||||||
|
{innerContent}
|
||||||
|
</TransitionLink>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
</nav>
|
</nav>
|
||||||
|
|||||||
Reference in New Issue
Block a user