basic api link for item list
This commit is contained in:
@@ -84,7 +84,7 @@ const Item = ({ imageUrl, name, price, newPrice, status }) => {
|
||||
return (
|
||||
|
||||
<Card className="item">
|
||||
<Card.Img className="item-img" variant="top" src={imageUrl} />
|
||||
<Card.Img className="item-img" variant="top" src={`/images/${imageUrl}_thumbnail.jpg`} />
|
||||
<Card.Body className="item-info">
|
||||
<div className="item-name-container">
|
||||
<Card.Title className="item-name">
|
||||
|
@@ -1,4 +1,3 @@
|
||||
import { Button } from 'react-bootstrap';
|
||||
import Item from './Item';
|
||||
import { Link } from 'react-router-dom';
|
||||
|
||||
@@ -9,21 +8,16 @@ const ItemList = ({ items }) => {
|
||||
<div className='item-list'>
|
||||
{items.map((item) =>
|
||||
<Link key={item.id} className='item-link' to={`/morceaux/${item.id}`}>
|
||||
<Item imageUrl={item.imageUrl}
|
||||
name={item.name}
|
||||
<Item imageUrl={item.imageName}
|
||||
name={item.title}
|
||||
price={item.price}
|
||||
status={item.status}
|
||||
newPrice={item.newPrice}
|
||||
newPrice={item.promoPrice}
|
||||
/>
|
||||
</Link>
|
||||
|
||||
)}
|
||||
</div>
|
||||
<div>
|
||||
<Button className='btn-load-more'>
|
||||
...
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
</>
|
||||
|
||||
)
|
||||
|
Reference in New Issue
Block a user