Skip to content

Commit

Permalink
Nutritional table behind details
Browse files Browse the repository at this point in the history
  • Loading branch information
bakaq committed Oct 8, 2024
1 parent ef5ebcc commit 7da2a2c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions frontend/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,12 +194,15 @@ function ItemCard({ itemId, itemData, getItems }) {
:
(
<div className="item-card">
<div className="item-card-header">
<h3>{itemData.name}</h3>
<div className="item-card-header">
<div className="item-price">R$ {itemData.price.toFixed(2)}</div>
<div className="item-weight">{itemData.weight.toPrecision(PRECISION)}g</div>
</div>
<NutritionalTable nutrition={itemData.nutrition} nutritionPrices={itemData.nutrition_prices} />
<details>
<summary>Nutritional Table</summary>
<NutritionalTable nutrition={itemData.nutrition} nutritionPrices={itemData.nutrition_prices} />
</details>
<div className="item-card-footer">
<button onClick={() => setEditing(true)}>Edit</button>
<button onClick={() => { removeItem(); }}>Remove</button>
Expand Down

0 comments on commit 7da2a2c

Please sign in to comment.