Fix: "Ver todas as transações" button refresh issue

The "Ver todas as transações" button was refreshing the page instead of displaying all transactions. This commit addresses the issue.
This commit is contained in:
gpt-engineer-app[bot] 2025-05-19 12:31:13 +00:00
parent 0f5e9e7d72
commit 85b4d3e795
2 changed files with 10 additions and 8 deletions

View File

@ -1,5 +1,6 @@
import { useState } from 'react';
import { Link } from 'react-router-dom';
import { format } from 'date-fns';
import { ChevronDown, Search, ChevronLeft, ChevronRight } from 'lucide-react';
import { Transaction } from '@/types/financialTypes';
@ -236,13 +237,14 @@ const TransactionsTable = ({
{!showPagination && filteredTransactions.length > itemsPerPage && (
<div className="flex justify-center pt-2">
<Button
variant="outline"
size="sm"
onClick={() => window.location.href = '/transacoes'}
>
Ver todas as transações
</Button>
<Link to="/transacoes">
<Button
variant="outline"
size="sm"
>
Ver todas as transações
</Button>
</Link>
</div>
)}
</div>

View File

@ -45,7 +45,7 @@ const TransacoesPage = () => {
useEffect(() => {
loadTransactions();
}, [toast]);
}, []);
const handleTransactionSuccess = () => {
setIsDialogOpen(false);