import { useBreakpoint, useReducedMotion } from 'common' import { navData as DevelopersData } from 'data/Solutions' import { ArrowLeftRight, ChevronRight } from 'lucide-react' import { AnimatePresence, motion } from 'motion/react' import Link from 'next/link' import { useState } from 'react' import { useMedia } from 'react-use' type LinkProps = { text: string description?: string url?: string icon?: any svg?: any } export const SolutionsDropdown = () => (
{/* Skill Level, Who it's for, App Type */} {DevelopersData['navigation'].slice(0, 3).map((column) => ( ))}
{DevelopersData['navigation'][3].links.map((link) => ( ))}
) const LinksGroup = ({ links, label }: { links: LinkProps[]; label: string }) => { return (
) } const MotionLink = motion(Link) const MigrationLinkCard = ({ link }: { link: LinkProps }) => { const [isHighlighted, setIsHighlighted] = useState(false) const canHover = useMedia('(hover: hover)', true) const reduceMotion = useReducedMotion() const isDesktop = !useBreakpoint('lg') const duration = isDesktop && !reduceMotion ? 0.2 : 0 const isIconVisible = isHighlighted || !isDesktop || !canHover return ( setIsHighlighted(true)} onMouseLeave={() => setIsHighlighted(false)} onFocus={() => setIsHighlighted(true)} onBlur={() => setIsHighlighted(false)} layout layoutDependency={isHighlighted} transition={{ duration, ease: 'easeInOut' }} > {isIconVisible && ( {link.icon && } )} {link.text} ) }