fix: hide empty invoices section

This commit is contained in:
Ali BARIN
2023-03-27 20:14:39 +00:00
parent f1cdc7e422
commit 4945240ec2

View File

@@ -13,7 +13,9 @@ import useFormatMessage from 'hooks/useFormatMessage';
export default function Invoices() {
const formatMessage = useFormatMessage();
const { invoices } = useInvoices();
const { invoices, loading } = useInvoices();
if (loading || invoices.length === 0) return <React.Fragment />;
return (
<React.Fragment>