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

30 lines
742 B
JavaScript
Raw Normal View History

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