astock-agent/frontend/src/app/sectors/page.tsx
2026-04-07 21:37:44 +08:00

25 lines
794 B
TypeScript

"use client";
import { useEffect, useState } from "react";
import { fetchAPI } from "@/lib/api";
import type { SectorData } from "@/lib/api";
import SectorHeatmap from "@/components/sector-heatmap";
export default function SectorsPage() {
const [sectors, setSectors] = useState<SectorData[]>([]);
useEffect(() => {
fetchAPI<SectorData[]>("/api/sectors/hot?limit=20").then(setSectors);
}, []);
return (
<div className="max-w-5xl mx-auto px-4 md:px-8 pt-6 pb-20 md:pb-10">
<div className="mb-5 animate-fade-in-up">
<h1 className="text-lg font-bold tracking-tight"></h1>
<p className="text-xs text-text-muted mt-0.5"></p>
</div>
<SectorHeatmap sectors={sectors} />
</div>
);
}