Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions apps/web/src/features/trade/components/chart/TVChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -348,7 +349,7 @@ export function TVChartContainer({ symbol, period }: Props) {
</VisuallyHidden>
)}

{/* Loading skeleton */}
{/* Loading skeleton overlay */}
{isLoading && (
<div
className="absolute inset-0 z-10 flex flex-col gap-1 p-2 bg-background/50 backdrop-blur-[1px]"
Expand Down
Loading