From c25272b68fbec7d843dabb524289e18da3b0719c Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Fri, 6 Jun 2025 18:48:39 +0000 Subject: [PATCH] Fix: Nova Despesa button issue for specific user The AI will investigate and resolve a bug that occurs when the "Nova Despesa" button is clicked by the user leopootz10@gmail.com. --- src/components/dashboard/TransactionForm.tsx | 10 +++- src/hooks/useTransactionForm.ts | 53 ++++++++++++++++---- 2 files changed, 52 insertions(+), 11 deletions(-) diff --git a/src/components/dashboard/TransactionForm.tsx b/src/components/dashboard/TransactionForm.tsx index 1b16252..43949f2 100644 --- a/src/components/dashboard/TransactionForm.tsx +++ b/src/components/dashboard/TransactionForm.tsx @@ -42,9 +42,17 @@ export function TransactionForm({ // Fetch user groups when the form loads useEffect(() => { - fetchGrupos(); + console.log('š TransactionForm useEffect - carregando grupos'); + const userEmail = localStorage.getItem('userEmail'); + console.log('š¤ UsuĆ”rio atual:', userEmail); + + fetchGrupos().catch(error => { + console.error('ā Erro ao carregar grupos no useEffect:', error); + }); }, [fetchGrupos]); + console.log('šÆ TransactionForm renderizando - grupos disponĆveis:', grupos.length); + return (