"use client"; import { useEffect, useState } from "react"; import { getFeaturedPartners } from "@/app/actions"; import { motion } from "framer-motion"; import DynamicLogo from "./DynamicLogo"; import Link from "next/link"; export default function Partners() { const [partners, setPartners] = useState([]); useEffect(() => { async function fetchPartners() { const data = await getFeaturedPartners(); setPartners(data || []); } fetchPartners(); }, []); if (partners.length === 0) return null; return (
{/* Left Label Section */} Partners {/* Partners List Section */}
{partners.slice(0, 5).map((partner, index) => { const content = ( {partner.logo ? (
{/* Normal State */}
{/* Hover State */}
) : ( {partner.name} )}
); if (partner.project_slug) { return ( {content} ); } return
{content}
; })}
{/* Right CTA Section */} Hepsini Gör
); }