diff --git a/src/components/Explore.tsx b/src/components/Explore.tsx index 4f4a5d4a..5a7d91c3 100644 --- a/src/components/Explore.tsx +++ b/src/components/Explore.tsx @@ -243,16 +243,25 @@ const Explore: React.FC = ({ relayPool, activeTab: propActiveTab } return classifyHighlights(highlights, activeAccount?.pubkey, followedPubkeys) }, [highlights, activeAccount?.pubkey, followedPubkeys]) + // Filter out blog posts with unreasonable future dates (allow 1 day for clock skew) + const filteredBlogPosts = useMemo(() => { + const maxFutureTime = Date.now() / 1000 + (24 * 60 * 60) // 1 day from now + return blogPosts.filter(post => { + const publishedTime = post.published || post.event.created_at + return publishedTime <= maxFutureTime + }) + }, [blogPosts]) + const renderTabContent = () => { switch (activeTab) { case 'writings': - return blogPosts.length === 0 ? ( + return filteredBlogPosts.length === 0 ? (

No blog posts found yet.

) : (
- {blogPosts.map((post) => ( + {filteredBlogPosts.map((post) => ( t[0] === 'd')?.[1]}`} post={post}