price -> prices (unfinished)
This commit is contained in:
@@ -32,7 +32,7 @@ export default function CardDish(props) {
|
||||
<h2>{name}</h2>
|
||||
<p>Porcja: {weight}</p>
|
||||
<p>
|
||||
{vegan && "Danie wegańskie "}
|
||||
{vegan && "Danie wegańskie | "}
|
||||
{vegetarian && "Danie wegetariańskie"}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
10
src/components/Output/DishPrices.js
Normal file
10
src/components/Output/DishPrices.js
Normal file
@@ -0,0 +1,10 @@
|
||||
import React from 'react'
|
||||
|
||||
export default function DishPrices(props) {
|
||||
const { prices } = props;
|
||||
|
||||
const display2 = prices.price2.price !== "";
|
||||
const display3 = prices.price3.price !== "";
|
||||
|
||||
return <p>{display2 || display3 && prices.price1.priceName}{" " + prices.price1.price}zł{ display2 && " / " + prices.price2.priceName + " " + prices.price2.price + "zł"}{ display3 && " / " + prices.price3.priceName + " " + prices.price3.price + "zł"}</p>
|
||||
}
|
||||
Reference in New Issue
Block a user