fix(profile): fetch all writings for profile pages by removing limit

- Make limit parameter configurable in fetchBlogPostsFromAuthors
- Default limit is 100 for Explore page (multiple authors)
- Pass null limit for Profile pages to fetch all writings
- Fixes issue where only 1 writing was shown instead of all
This commit is contained in:
Gigi
2025-10-19 01:35:00 +02:00
parent aa6aeb2723
commit 17fdd92827
2 changed files with 12 additions and 5 deletions

View File

@@ -73,8 +73,8 @@ const Profile: React.FC<ProfileProps> = ({
console.warn('⚠️ [Profile] Failed to fetch highlights:', err)
})
// Fetch writings in background
fetchBlogPostsFromAuthors(relayPool, [pubkey], RELAYS)
// Fetch writings in background (no limit for single user profile)
fetchBlogPostsFromAuthors(relayPool, [pubkey], RELAYS, undefined, null)
.then(writings => {
writings.forEach(w => eventStore.add(w.event))
console.log('✅ [Profile] Fetched', writings.length, 'writings')