'use client' import { useState, useEffect } from 'react' import type { TrumpPost } from '@/types' import { getPosts } from '@/lib/api' import PostRow from '@/components/dashboard/PostCards' export default function PostsPage() { const [posts, setPosts] = useState([]) const [loading, setLoading] = useState(true) const [filter, setFilter] = useState('all') useEffect(() => { getPosts(200, 1).then(setPosts).catch(() => {}).finally(() => setLoading(false)) }, []) const filtered = posts.filter(p => { if (filter !== 'all' && p.sentiment !== filter) return false return true }) const counts = { all: posts.length, bullish: posts.filter(p => p.sentiment === 'bullish').length, bearish: posts.filter(p => p.sentiment === 'bearish').length, neutral: posts.filter(p => p.sentiment === 'neutral').length, } return (

Signals feed

Every post we tracked, every prediction we made. {posts.length} posts in the last 30 days.

Streaming
{(['all', 'bullish', 'bearish', 'neutral'] as const).map(f => ( ))}
{loading &&
Loading…
} {!loading && filtered.length === 0 ? (
No posts match the current sentiment filter.
) : (
{filtered.map(p => ( ))}
)}
) }