fix: add XRP/SOL to trades and kline pages
This commit is contained in:
parent
5cf2003ca7
commit
2c28d660ce
@ -118,7 +118,7 @@ function KChart({
|
||||
}
|
||||
|
||||
export default function KlinePage() {
|
||||
const [symbol, setSymbol] = useState<"BTC" | "ETH">("BTC");
|
||||
const [symbol, setSymbol] = useState<"BTC" | "ETH" | "XRP" | "SOL">("BTC");
|
||||
const [rateInterval, setRateInterval] = useState("1h");
|
||||
const [priceInterval, setPriceInterval] = useState("1h");
|
||||
|
||||
@ -128,7 +128,7 @@ export default function KlinePage() {
|
||||
<div className="flex items-center justify-between flex-wrap gap-3">
|
||||
<h1 className="text-2xl font-bold text-slate-900">费率 K 线</h1>
|
||||
<div className="flex gap-2 text-sm">
|
||||
{(["BTC", "ETH"] as const).map(s => (
|
||||
{(["BTC", "ETH", "XRP", "SOL"] as const).map(s => (
|
||||
<button key={s} onClick={() => setSymbol(s)}
|
||||
className={`px-4 py-1.5 rounded-lg border font-medium transition-colors ${symbol === s ? "bg-blue-600 text-white border-blue-600" : "border-slate-200 text-slate-600 hover:border-blue-400"}`}>
|
||||
{s}
|
||||
|
||||
@ -29,7 +29,7 @@ interface SummaryBar {
|
||||
max_qty: number;
|
||||
}
|
||||
|
||||
type Symbol = "BTC" | "ETH";
|
||||
type Symbol = "BTC" | "ETH" | "XRP" | "SOL";
|
||||
type Interval = "1m" | "5m" | "15m" | "1h";
|
||||
|
||||
const INTERVALS: { label: string; value: Interval }[] = [
|
||||
@ -231,7 +231,7 @@ function FlowAnalysis({ symbol }: { symbol: Symbol }) {
|
||||
</span>
|
||||
(每{interval}聚合一根,每30秒刷新)
|
||||
</p>
|
||||
<p className="text-xs text-slate-400">单位:{symbol === "BTC" ? "BTC" : "ETH"}</p>
|
||||
<p className="text-xs text-slate-400">单位:{symbol}</p>
|
||||
</div>
|
||||
<div className="grid grid-cols-2 md:grid-cols-4 gap-2">
|
||||
<div className="bg-slate-50 rounded-lg p-3">
|
||||
@ -353,7 +353,7 @@ export default function TradesPage() {
|
||||
<p className="text-slate-500 text-xs mt-0.5">实时成交记录 + 买卖 Delta 分析</p>
|
||||
</div>
|
||||
<div className="flex gap-1.5">
|
||||
{(["BTC", "ETH"] as Symbol[]).map(s => (
|
||||
{(["BTC", "ETH", "XRP", "SOL"] as Symbol[]).map(s => (
|
||||
<button key={s} onClick={() => setSymbol(s)}
|
||||
className={`px-4 py-1.5 rounded-lg border text-sm font-medium transition-colors ${symbol === s ? "bg-blue-600 text-white border-blue-600" : "border-slate-200 text-slate-600 hover:border-blue-400"}`}>
|
||||
{s}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user