import React from 'react'; import CardBox from '../CardBox'; import dataFormatter from '../../helpers/dataFormatter'; import ListActionsPopover from "../ListActionsPopover"; import {useAppSelector} from "../../stores/hooks"; import {Pagination} from "../Pagination"; import LoadingSpinner from "../LoadingSpinner"; import Link from 'next/link'; type Props = { invoices: any[]; loading: boolean; onDelete: (id: string) => void; currentPage: number; numPages: number; onPageChange: (page: number) => void; }; const ListInvoices = ({ invoices, loading, onDelete, currentPage, numPages, onPageChange }: Props) => { const corners = useAppSelector((state) => state.style.corners); const bgColor = useAppSelector((state) => state.style.cardsColor); return ( <>
{loading && } {!loading && invoices.map((item) => (

Amountoriginal

{ item.amountoriginal }

Currency

{ item.currency }

Incomecost

{ item.incomecost }

Amountpln

{ item.amountpln }

Invoicedate

{ dataFormatter.dateFormatter(item.invoicedate) }

Period

{ item.period }

Description

{ item.description }

Attachment

{ item.attachment }

))} {!loading && invoices.length === 0 && (

No data to display

)}
) }; export default ListInvoices