

export default function TopCreators({ creators }) {
    return (
        <div className="mt-10">
            <h2 className="text-3xl font-bold mb-4 text-white">Top Creators</h2>
            <div className="flex flex-wrap">
                {creators && creators.map((creator, index) => (
                    <div key={creator.id || index} className="flex flex-col items-center w-1/4 p-4">
                        <img src={creator.avatar} alt={creator.name} className="w-full h-auto rounded-lg" />
                        <h3 className="text-xl font-bold mt-2">{creator.name}</h3>
                        <span className="text-sm text-gray-500">{creator.subscribers} subscribers</span>
                    </div>
                ))}
            </div>
        </div>
    );
}