From 57343432dac20deaece294ef8341548e5e286f2a Mon Sep 17 00:00:00 2001 From: Jason Date: Tue, 14 Apr 2026 15:47:55 +0800 Subject: [PATCH] fix: remove duplicate usage summary from app filter bar The request count and total cost were displayed both in the app filter bar and in the UsageSummaryCards below it. Remove the redundant inline summary and its unused imports. --- src/components/usage/UsageDashboard.tsx | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/src/components/usage/UsageDashboard.tsx b/src/components/usage/UsageDashboard.tsx index 381053c7f..7690279e3 100644 --- a/src/components/usage/UsageDashboard.tsx +++ b/src/components/usage/UsageDashboard.tsx @@ -7,7 +7,6 @@ import { RequestLogTable } from "./RequestLogTable"; import { ProviderStatsTable } from "./ProviderStatsTable"; import { ModelStatsTable } from "./ModelStatsTable"; import type { AppTypeFilter, TimeRange } from "@/types/usage"; -import { useUsageSummary } from "@/lib/query/usage"; import { motion } from "framer-motion"; import { BarChart3, @@ -27,7 +26,6 @@ import { } from "@/components/ui/accordion"; import { PricingConfigPanel } from "@/components/usage/PricingConfigPanel"; import { cn } from "@/lib/utils"; -import { fmtUsd, parseFiniteNumber } from "./format"; const APP_FILTER_OPTIONS: AppTypeFilter[] = [ "all", @@ -57,11 +55,6 @@ export function UsageDashboard() { const days = timeRange === "1d" ? 1 : timeRange === "7d" ? 7 : 30; - // Summary data for the app filter bar - const { data: summaryData } = useUsageSummary(days, appType, { - refetchInterval: refreshIntervalMs > 0 ? refreshIntervalMs : false, - }); - return ( ))} -
- - {(summaryData?.totalRequests ?? 0).toLocaleString()}{" "} - {t("usage.requestsLabel")} - - | - - {fmtUsd(parseFiniteNumber(summaryData?.totalCost) ?? 0, 4)}{" "} - {t("usage.costLabel")} - -