Make sure invoices card is visible only on orders other than unconfirmed (#944)

* Make sure invoices card is visible only on orders other than unconfirmed

* Replace div with React.Fragment

* Use short form of fragment and remove key
This commit is contained in:
Tomasz Szymański 2021-01-15 11:10:52 +01:00 committed by GitHub
parent 167b77e18a
commit 0578de63c6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -254,13 +254,17 @@ const OrderDetailsPage: React.FC<OrderDetailsPageProps> = props => {
selectedChannelName={order?.channel?.name} selectedChannelName={order?.channel?.name}
/> />
<CardSpacer /> <CardSpacer />
<OrderInvoiceList {order?.status !== OrderStatus.UNCONFIRMED && (
invoices={order?.invoices} <>
onInvoiceClick={onInvoiceClick} <OrderInvoiceList
onInvoiceGenerate={onInvoiceGenerate} invoices={order?.invoices}
onInvoiceSend={onInvoiceSend} onInvoiceClick={onInvoiceClick}
/> onInvoiceGenerate={onInvoiceGenerate}
<CardSpacer /> onInvoiceSend={onInvoiceSend}
/>
<CardSpacer />
</>
)}
<OrderCustomerNote note={maybe(() => order.customerNote)} /> <OrderCustomerNote note={maybe(() => order.customerNote)} />
</div> </div>
</Grid> </Grid>