Show message on ReceiptsView if no contracts were submitted

pull/5285/head
Manuel Wedler 4 months ago committed by Aniket
parent 038f7a7ded
commit 590fd6d253
  1. 5
      apps/contract-verification/src/app/views/ReceiptsView.tsx

@ -4,12 +4,11 @@ import { AppContext } from '../AppContext'
export const ReceiptsView = () => {
const { submittedContracts } = useContext(AppContext)
const contracts = Object.values(submittedContracts).reverse()
return (
<div className="accordion" id="receiptsAccordion">
{Object.values(submittedContracts).reverse().map((contract, index) => (
<AccordionReceipt contract={contract} index={index} />
))}
{contracts.length > 0 ? contracts.map((contract, index) => <AccordionReceipt contract={contract} index={index} />) : <div className="text-center mt-5">No contracts submitted for verification</div>}
</div>
)
}

Loading…
Cancel
Save