Spaces:
Sleeping
Sleeping
debug: dodaj console.log CACHE CHECK w ChartsSection
Browse files
frontend/app/dashboard/components/ChartsSection.tsx
CHANGED
|
@@ -71,6 +71,12 @@ export default function ChartsSection({
|
|
| 71 |
const chartsSectionRef = useRef<HTMLDivElement | null>(null);
|
| 72 |
const hasLoadedRef = useRef(false);
|
| 73 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 74 |
// ── Effective values ────────────────────────────────────────────────────────
|
| 75 |
// Live dane z hooka (subskrypcja Zustand) mają priorytet nad starym cache z localStorage.
|
| 76 |
// Dzięki temu zmiana artykułów (SSE/prefetch) natychmiast aktualizuje wykresy.
|
|
|
|
| 71 |
const chartsSectionRef = useRef<HTMLDivElement | null>(null);
|
| 72 |
const hasLoadedRef = useRef(false);
|
| 73 |
|
| 74 |
+
console.log('[CACHE CHECK]', {
|
| 75 |
+
cachedCharts: !!cachedCharts,
|
| 76 |
+
cachedChartsData: cachedCharts ? Object.keys(cachedCharts) : null,
|
| 77 |
+
hasLoadedRef: hasLoadedRef?.current
|
| 78 |
+
});
|
| 79 |
+
|
| 80 |
// ── Effective values ────────────────────────────────────────────────────────
|
| 81 |
// Live dane z hooka (subskrypcja Zustand) mają priorytet nad starym cache z localStorage.
|
| 82 |
// Dzięki temu zmiana artykułów (SSE/prefetch) natychmiast aktualizuje wykresy.
|