import { fetchCommunityStats, fmtNum, fmtUsd } from '@/lib/telemetry'; /** * Server component that renders the top-level stats for the community savings page. * Fetches live data from Supabase at render time. */ export async function CommunityStatsHeader() { const data = await fetchCommunityStats(); const stats = [ { value: fmtNum(data.total_tokens_saved), label: 'Tokens Saved' }, { value: fmtUsd(data.total_cost_saved), label: 'Cost Saved' }, { value: fmtNum(data.total_requests), label: 'Requests Optimized' }, { value: fmtNum(data.unique_instances), label: 'Active Instances' }, ]; return (