"use client"; import type { PortfolioExperience } from "@/lib/portfolio-data"; import { motion, type Variants, useReducedMotion } from "framer-motion"; import { Section } from "./Section"; import { DrawLine } from "./animations/DrawLine"; export default function Experience({ experiences, }: { experiences: PortfolioExperience[]; }) { const shouldReduceMotion = useReducedMotion(); const sortedExperiences = [...experiences] .filter((experience) => experience.featured) .sort((a, b) => { const yearA = Number.parseInt(a.period.match(/\d{4}/)?.[0] || "0", 10); const yearB = Number.parseInt(b.period.match(/\d{4}/)?.[0] || "0", 10); return yearB - yearA; }); const listVariants: Variants = { hidden: {}, visible: { transition: { delayChildren: 0.08, staggerChildren: 0.08, }, }, }; const itemVariants: Variants = { hidden: shouldReduceMotion ? { opacity: 0 } : { opacity: 0, y: 20, clipPath: "inset(100% 0 0 0)" }, visible: { opacity: 1, y: 0, clipPath: "inset(0% 0 0 0)", transition: shouldReduceMotion ? { duration: 0.25 } : { duration: 0.8, ease: [0.16, 1, 0.3, 1] }, }, }; return (
{sortedExperiences.map((exp) => (
{exp.period}

{exp.title}

{exp.company} • {exp.type}

{exp.location}

{exp.description}

    {exp.achievements?.map((achievement) => (
  • {achievement}
  • ))}
    {exp.technologies?.slice(0, 6).map((tech) => (
  • {tech}
  • ))}
))}
); }