+ button
This commit is contained in:
parent
48a87f84de
commit
9e084428d9
@ -261,7 +261,7 @@ class Main extends Component {
|
|||||||
<div class="nav-link">Přihlášen {this.state.login_status.first_name} {this.state.login_status.last_name} <a href="/api/logout">Odhlásit</a></div>
|
<div class="nav-link">Přihlášen {this.state.login_status.first_name} {this.state.login_status.last_name} <a href="/api/logout">Odhlásit</a></div>
|
||||||
</li>
|
</li>
|
||||||
}
|
}
|
||||||
{Object.keys(this.state.login_status).length > 0 &&
|
{Object.keys(this.state.login_status).length > 0 && this.state.products.length > 0 &&
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" href="#eshop">Eshop</a>
|
<a class="nav-link" href="#eshop">Eshop</a>
|
||||||
</li>
|
</li>
|
||||||
@ -298,7 +298,10 @@ class Main extends Component {
|
|||||||
{this.state.cart.map(product =>
|
{this.state.cart.map(product =>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{product.name}</td>
|
<td>{product.name}</td>
|
||||||
<td>{product.quantity}</td>
|
<td>
|
||||||
|
<button type="button" class="btn btn-light" onClick={(e) => {this.addToCart(product)}}>+</button>
|
||||||
|
{product.quantity}
|
||||||
|
</td>
|
||||||
<td>{product.price} Kč</td>
|
<td>{product.price} Kč</td>
|
||||||
<td><button type="button" class="btn btn-light" onClick={(e) => {this.deleteProduct(product)}}>Smazat</button></td>
|
<td><button type="button" class="btn btn-light" onClick={(e) => {this.deleteProduct(product)}}>Smazat</button></td>
|
||||||
</tr>)}
|
</tr>)}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user