diff --git a/apps/web/src/features/trade/components/chart/TVChart.tsx b/apps/web/src/features/trade/components/chart/TVChart.tsx index 0f8ab8e..1553d87 100644 --- a/apps/web/src/features/trade/components/chart/TVChart.tsx +++ b/apps/web/src/features/trade/components/chart/TVChart.tsx @@ -23,9 +23,6 @@ export function TVChart({ symbol, onSelectToken }: Props) { // When the period changes, persist preference and invalidate the candles cache function handlePeriodChange(p: Period) { setPeriod(p) - if (symbol) { - void queryClient.invalidateQueries({ queryKey: queryKeys.oracleCandles(symbol, p) }) - } } // Keyboard navigation: Left/Right arrows move between period buttons diff --git a/apps/web/src/features/trade/components/chart/TVChartContainer.tsx b/apps/web/src/features/trade/components/chart/TVChartContainer.tsx index 8d6aeb1..f824c00 100644 --- a/apps/web/src/features/trade/components/chart/TVChartContainer.tsx +++ b/apps/web/src/features/trade/components/chart/TVChartContainer.tsx @@ -4,6 +4,7 @@ import { useQueryClient } from "@tanstack/react-query" import { Skeleton } from "@workspace/ui/components/skeleton" import { VisuallyHidden } from "@workspace/ui/components/visually-hidden" import { LiveRegion, useAnnouncer } from "@workspace/ui/components/live-region" +import { cn } from "@workspace/ui/lib/utils" import { Table, TableBody, @@ -245,7 +246,7 @@ export function TVChartContainer({ symbol, period }: Props) { // Only allowed after historical data is loaded (hasDataRef guards the race // where a live bar arrives before the first setData call completes). useEffect(() => { - if (!seriesRef.current || !liveBar || !hasDataRef.current) return + if (!seriesRef.current || !liveBar || !hasDataRef.current.current) return try { seriesRef.current.update(toChartBar(liveBar)) } catch { @@ -348,7 +349,7 @@ export function TVChartContainer({ symbol, period }: Props) { )} - {/* Loading skeleton */} + {/* Loading skeleton overlay */} {isLoading && (