Merge pull request #12 from iptq/michael/move-receipt-total-below

Move receipt total below
This commit is contained in:
Dingway98 2022-11-07 00:12:33 -08:00 committed by GitHub
commit ffb80c65d3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -70,6 +70,10 @@ const Home: NextPage = () => {
/> />
</Form> </Form>
{receipt.map((itemAtom, i) => {
return <ReceiptItem itemAtom={itemAtom} key={`receiptItem-${i}`} />;
})}
<div> <div>
Receipt Total: Receipt Total:
<span style={total < calculated.subtotal ? { color: "red" } : {}}> <span style={total < calculated.subtotal ? { color: "red" } : {}}>
@ -80,9 +84,7 @@ const Home: NextPage = () => {
</span> </span>
</div> </div>
{receipt.map((itemAtom, i) => { <hr />
return <ReceiptItem itemAtom={itemAtom} key={`receiptItem-${i}`} />;
})}
{calculated.totalMap.size > 0 && ( {calculated.totalMap.size > 0 && (
<> <>