9router/src/app/(dashboard)/dashboard/usage/page.js

31 lines
742 B
JavaScript
Raw Normal View History

2026-01-18 22:39:30 -05:00
"use client";
2026-01-19 11:01:39 -05:00
import { useState, Suspense } from "react";
2026-01-31 00:58:04 -05:00
import { UsageStats, RequestLogger, CardSkeleton, SegmentedControl } from "@/shared/components";
2026-01-18 22:39:30 -05:00
export default function UsagePage() {
const [activeTab, setActiveTab] = useState("overview");
return (
<div className="flex flex-col gap-6">
2026-01-31 00:58:04 -05:00
<SegmentedControl
options={[
{ value: "overview", label: "Overview" },
{ value: "logs", label: "Logger" },
]}
value={activeTab}
onChange={setActiveTab}
/>
2026-01-18 22:39:30 -05:00
{/* Content */}
{activeTab === "overview" ? (
<Suspense fallback={<CardSkeleton />}>
<UsageStats />
</Suspense>
) : (
<RequestLogger />
)}
2026-01-18 22:39:30 -05:00
</div>
);
}