From cebc72e3438dca5aad69b2828cb0d0f2e54b168d Mon Sep 17 00:00:00 2001 From: decolua Date: Thu, 14 May 2026 11:16:52 +0700 Subject: [PATCH] Fix small bug --- src/app/(dashboard)/dashboard/usage/page.js | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/src/app/(dashboard)/dashboard/usage/page.js b/src/app/(dashboard)/dashboard/usage/page.js index 05daa2c..3a7d9ce 100644 --- a/src/app/(dashboard)/dashboard/usage/page.js +++ b/src/app/(dashboard)/dashboard/usage/page.js @@ -25,7 +25,6 @@ function UsageContent() { const searchParams = useSearchParams(); const router = useRouter(); - const [tabLoading, setTabLoading] = useState(false); const [period, setPeriod] = useState("7d"); const tabFromUrl = searchParams.get("tab"); @@ -35,11 +34,9 @@ function UsageContent() { const handleTabChange = (value) => { if (value === activeTab) return; - setTabLoading(true); const params = new URLSearchParams(searchParams); params.set("tab", value); router.push(`/dashboard/usage?${params.toString()}`, { scroll: false }); - setTimeout(() => setTabLoading(false), 300); }; return ( @@ -66,19 +63,13 @@ function UsageContent() { )} - {tabLoading ? ( - - ) : ( - <> - {activeTab === "overview" && ( - }> - - - )} - {activeTab === "logs" && } - {activeTab === "details" && } - + {activeTab === "overview" && ( + }> + + )} + {activeTab === "logs" && } + {activeTab === "details" && } ); }