diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index bfa8beb..a07d87e 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -1,9 +1,9 @@ import * as React from "react"; import { api } from "./api/client"; import { Chat } from "./components/Chat"; -import { TokenUsagePage } from "./components/TokenUsagePage"; import { SelectionScreen } from "./components/selection/SelectionScreen"; import { usePathCompletion } from "./components/selection/usePathCompletion"; +import { TokenUsagePage } from "./components/TokenUsagePage"; import "./App.css"; type AppView = "chat" | "token-usage"; diff --git a/frontend/src/components/TokenUsagePage.tsx b/frontend/src/components/TokenUsagePage.tsx index 9b32f40..da07aaa 100644 --- a/frontend/src/components/TokenUsagePage.tsx +++ b/frontend/src/components/TokenUsagePage.tsx @@ -1,6 +1,6 @@ import * as React from "react"; -import { api } from "../api/client"; import type { TokenUsageRecord } from "../api/client"; +import { api } from "../api/client"; type SortKey = | "timestamp" @@ -105,7 +105,7 @@ export function TokenUsagePage({ projectPath }: TokenUsagePageProps) { setError(e instanceof Error ? e.message : "Failed to load token usage"), ) .finally(() => setLoading(false)); - }, [projectPath]); + }, []); function handleSort(key: SortKey) { if (key === sortKey) { @@ -397,7 +397,11 @@ function SummaryCard({ label, value, highlight = false, -}: { label: string; value: string; highlight?: boolean }) { +}: { + label: string; + value: string; + highlight?: boolean; +}) { return (