'use client'; import { useRef, useEffect } from 'react'; import { useTranslations } from "next-intl"; type props = { technologies: string[]; }; export function ProjectTechnologies({ technologies }: props) { const ref = useRef(null); const t = useTranslations('projectPage.technologies'); useEffect(() => { const el = ref.current; if (!el) return; const observer = new IntersectionObserver( ([entry]) => { if (entry.isIntersecting) { el.querySelectorAll('.reveal').forEach((node, i) => { setTimeout(() => node.classList.add('visible'), i * 60); }); observer.unobserve(el); } }, { threshold: 0.2 } ); observer.observe(el); return () => observer.disconnect(); }, []); return (
{t('sectionLabel')}
{technologies.map((tech) => ( {tech} ))}
); }