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

Trending Accounts

{profiles && profiles.length > 0 && profiles.slice(0,4).map((profile, index) => ( ))}
); }