import { motion, AnimatePresence } from 'framer-motion'
import { ArrowLeftRight, ChevronRight } from 'lucide-react'
import Link from 'next/link'
import { useState } from 'react'
import { useWindowSize } from 'react-use'
import { navData as DevelopersData } from 'data/Solutions'
type LinkProps = {
text: string
description?: string
url?: string
icon?: any
svg?: any
}
export const SolutionsDropdown = () => (
{/* two first columns */}
{DevelopersData['navigation'].slice(0, 2).map((column) => (
))}
{DevelopersData['navigation'][2].links.map((link) => (
))}
)
const LinksGroup = ({ links, label }: { links: LinkProps[]; label: string }) => {
return (
{links.map(({ icon: Icon, ...link }: LinkProps) => (
-
{Icon && }
{link.text}
))}
)
}
const MotionLink = motion(Link)
const MigrationLinkCard = ({ link }: { link: LinkProps }) => {
const [hovered, setHovered] = useState(false)
const { width } = useWindowSize()
const isDesktop = width >= 1280
return (
setHovered(true)}
onMouseLeave={() => setHovered(false)}
layout
>
{(hovered || !isDesktop) && (
{link.icon && }
)}
{link.text}
)
}