"use client"; import { useMemo } from "react"; import { usePortfolioData } from "@/lib/usePortfolioData"; import { Section } from "./Section"; export default function Experience() { const { data, loading, error } = usePortfolioData(); const sortedExperiences = useMemo(() => { if (!data?.experiences) return []; return [...data.experiences] .filter((exp) => exp.featured) .sort((a, b) => { const yearA = parseInt(a.period.match(/\d{4}/)?.[0] || "0", 10); const yearB = parseInt(b.period.match(/\d{4}/)?.[0] || "0", 10); return yearB - yearA; }); }, [data]); if (loading) return
Loading system logs
; if (error || !data) return
Error loading system logs
; return (
{sortedExperiences.map((exp) => (
{exp.period}

{exp.title}

{exp.company} · {exp.type}
{exp.location} {exp.technologies.length} tecnologias

{exp.description}

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