"use client"; import { useEffect, useState } from "react"; import { api, SignalHistoryItem } from "@/lib/api"; export default function SignalsPage() { const [items, setItems] = useState([]); const [loading, setLoading] = useState(true); const [error, setError] = useState(""); useEffect(() => { const run = async () => { try { const data = await api.signalsHistory(); setItems(data.items || []); } catch { setError("加载信号历史失败"); } finally { setLoading(false); } }; run(); }, []); return (

信号历史

{loading ?

加载中...

: null} {error ?

{error}

: null} {!loading && !error ? ( {items.map((row) => ( ))} {!items.length ? ( ) : null}
时间 币种 年化 信号类型
{new Date(row.sent_at).toLocaleString("zh-CN")} {row.symbol} {row.annualized}% 资金费率套利信号
暂无信号记录(费率超10%时自动触发)
) : null}
); }