'use client' import { useEffect, useState } from 'react' import { motion } from 'framer-motion' import { useEngineStore } from '@/store/engineStore' import { formatUptime } from '@/lib/utils' import StatsGrid from '@/components/dashboard/StatsGrid' import RecentListings from '@/components/dashboard/RecentListings' import EngineConsole from '@/components/dashboard/EngineConsole' import ActivityLog from '@/components/dashboard/ActivityLog' const BASE = 'http://localhost:8000' /* ── Live clock ──────────────────────────────────────────────── */ function LiveClock() { const [tick, setTick] = useState('') useEffect(() => { const fmt = () => new Date().toLocaleTimeString([], { hour: '2-digit', minute: '2-digit', second: '2-digit', }) setTick(fmt()) const id = setInterval(() => setTick(fmt()), 1000) return () => clearInterval(id) }, []) return ( {tick} ) } /* ── Connection badge ────────────────────────────────────────── */ function ConnectionBadge({ offline }: { offline: boolean }) { return (
{offline ? 'OFFLINE' : 'LIVE'}
) } /* ── Divider strip ───────────────────────────────────────────── */ function SectionLabel({ children }: { children: React.ReactNode }) { return (
{children}
) } /* ── Main ────────────────────────────────────────────────────── */ export default function DashboardPage() { const { status, uptime_seconds, total_scanned, total_alerts, isOffline } = useEngineStore() const [keywordCount, setKeywordCount] = useState(0) useEffect(() => { fetch(`${BASE}/api/keywords`) .then(r => r.json()) .then(d => { if (Array.isArray(d)) setKeywordCount(d.length) }) .catch(() => {}) }, []) return (
{/* ── Page header ──────────────────────────────────────── */}

Mission Control

Auction intelligence engine · Ghost Node v2.7

{/* Quick export shortcut */} Export
{/* ── Glow divider ─────────────────────────────────────── */}
{/* ── Stats strip ──────────────────────────────────────── */}
{/* ── Main grid ────────────────────────────────────────── */}
Live Feed
{/* ── Activity log ─────────────────────────────────────── */}
Activity Log
) }