'use client' import { useState, useEffect, useMemo } from 'react' import dynamic from 'next/dynamic' import { useLocale } from 'next-intl' import type { TrumpPost } from '@/types' import { getPosts, getFundingSnapshot, type FundingSnapshot } from '@/lib/api' import { swrFetch } from '@/lib/cache' import PostRow from '@/components/dashboard/PostCards' import SystemControl from '@/components/signals/SystemControl' import InfoTip from '@/components/ui/InfoTip' // MacroPanel is 631 lines with heavy indicator math — split it out. const MacroPanel = dynamic(() => import('@/components/btc/MacroPanel'), { ssr: false, loading: () =>
, }) /** * System 2 — BTC bottom-reversal. Its own dedicated page. * Shows the scanner control + ONLY source === 'btc_bottom_reversal' signals. */ const SENTIMENTS = ['all', 'bullish', 'bearish', 'neutral'] as const type SentimentFilter = (typeof SENTIMENTS)[number] type BtcTab = 'bottom' | 'funding' interface MacroVibesPageProps { initialPosts?: TrumpPost[] | null initialFundingSnapshot?: FundingSnapshot | null } export default function MacroVibesPage({ initialPosts = null, initialFundingSnapshot = null, }: MacroVibesPageProps) { const locale = useLocale() const isZh = false // i18n shelved — Chinese branches kept as dead code for future revival; see messages/zh.json const [posts, setPosts] = useState