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:
parent
0f5e9e7d72
commit
85b4d3e795
@ -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>
|
||||
|
||||
@ -45,7 +45,7 @@ const TransacoesPage = () => {
|
||||
|
||||
useEffect(() => {
|
||||
loadTransactions();
|
||||
}, [toast]);
|
||||
}, []);
|
||||
|
||||
const handleTransactionSuccess = () => {
|
||||
setIsDialogOpen(false);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user