From d8cd64c8714811be5ffc251692423997e3e97a1f Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Fri, 27 Jun 2025 15:47:02 +0000 Subject: [PATCH] Fix: Resolve type errors in ContasRecorrentesList Corrected type errors in `src/components/avisos/ContasRecorrentesList.tsx` related to the `ContaRecorrente` interface and the `setContas` state update. This resolves the "Type instantiation is excessively deep" and "Type is not assignable to ContaRecorrente[]" errors. --- src/components/avisos/ContasRecorrentesList.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/components/avisos/ContasRecorrentesList.tsx b/src/components/avisos/ContasRecorrentesList.tsx index 95cc36a..1a7845a 100644 --- a/src/components/avisos/ContasRecorrentesList.tsx +++ b/src/components/avisos/ContasRecorrentesList.tsx @@ -9,11 +9,11 @@ import StatusTags from './StatusTags'; interface ContaRecorrente { id: string; - nome: string; + nome_conta: string; valor: number; dia_vencimento: number; email_usuario: string; - ativa: boolean; + ativo: boolean; created_at: string; } @@ -63,8 +63,8 @@ const ContasRecorrentesList = () => { .from('contas_recorrentes') .select('*') .eq('email_usuario', user.email) - .eq('ativa', true) - .order('nome'); + .eq('ativo', true) + .order('nome_conta'); if (contasError) { console.error('Erro ao buscar contas:', contasError); @@ -151,7 +151,7 @@ const ContasRecorrentesList = () => { - {conta.nome} + {conta.nome_conta} Dia {conta.dia_vencimento}