Skip to content

Commit e073ae5

Browse files
committed
issue no 65
1 parent 4ccbb31 commit e073ae5

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

src/components/InvoiceTable.tsx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,8 @@ const InvoiceTable: React.FC<InvoiceTableProps> = ({ filters }) => {
6161
} = useQuery<InvoicesResponse>({
6262
queryKey: ['invoices', currentPage, itemsPerPage, filters],
6363
queryFn: async () => {
64-
const response = await fetch(`/api/invoices?${queryString}`);
65-
if (!response.ok) {
66-
throw new Error('Failed to fetch invoices');
6764
try {
68-
const response = await fetch(
69-
`/api/invoices?page=${currentPage}&limit=${itemsPerPage}`
70-
);
65+
const response = await fetch(`/api/invoices?${queryString}`);
7166
if (!response.ok) {
7267
throw new Error(`HTTP ${response.status}: ${response.statusText}`);
7368
}

0 commit comments

Comments
 (0)