import React, { useState, useEffect } from 'react'; import TrendingImage from './TrendingImage'; export function TrendingImages() { const [profiles, setProfiles] = useState([]); useEffect(() => { fetch('https://api.nostr.band/v0/trending/images') .then(res => res.json()) .then(data => setProfiles(data.images)) .catch(error => { console.error('Error calling trending profiles:', error); }); }, []); return (

Currently Trending

{profiles && profiles.length > 0 && profiles.map((profile, index) => ( //

{profile.id}

))}
); }