From 738730b549663bcbf4cdf60ff326a3f91cdbd825 Mon Sep 17 00:00:00 2001 From: marcoitaloesp-ai Date: Tue, 16 Dec 2025 20:21:30 +0000 Subject: [PATCH] =?UTF-8?q?v1.43.23=20-=20FIX=20CRITICAL:=20Erro=20inicial?= =?UTF-8?q?iza=C3=A7=C3=A3o=20circular=20Dashboard?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 8 ++++++++ VERSION | 2 +- frontend/src/pages/Dashboard.jsx | 5 +---- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e48b3f4..c364550 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,14 @@ O formato segue [Keep a Changelog](https://keepachangelog.com/pt-BR/). Este projeto adota [Versionamento Semântico](https://semver.org/pt-BR/). +## [1.43.23] - 2025-12-16 + +### Fixed +- 🐛 **Critical**: Erro de inicialização circular no Dashboard causado por dependências no useEffect de eventos + - Removidas dependências `loadSummary`, `loadCashflow`, `loadVariances` do array de dependências + - useEffect agora apenas atualiza `refreshKey`, permitindo que componentes façam seus próprios fetches + - Corrigido erro: "Cannot access 'O' before initialization" + ## [1.43.22] - 2025-12-16 ### Fixed diff --git a/VERSION b/VERSION index fe00e14..56c60d6 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.43.22 +1.43.23 diff --git a/frontend/src/pages/Dashboard.jsx b/frontend/src/pages/Dashboard.jsx index c934117..958d454 100644 --- a/frontend/src/pages/Dashboard.jsx +++ b/frontend/src/pages/Dashboard.jsx @@ -47,9 +47,6 @@ const Dashboard = () => { useEffect(() => { const handleDataChange = () => { setRefreshKey(prev => prev + 1); - loadSummary(); - loadCashflow(); - loadVariances(); }; // Eventos que devem triggar refresh @@ -66,7 +63,7 @@ const Dashboard = () => { window.removeEventListener('recurring-paid', handleDataChange); window.removeEventListener('recurring-updated', handleDataChange); }; - }, [loadSummary, loadCashflow, loadVariances]); + }, []); // Sem dependências para evitar loops // Carregar resumo geral const loadSummary = useCallback(async () => {