mirror of
https://gitea.smigz.com/smiggiddy/odin-codeprojects.git
synced 2025-07-16 22:30:37 -04:00
basic functionality complete
This commit is contained in:
parent
81d70ec032
commit
f34aa95bfe
9 changed files with 98 additions and 37 deletions
|
@ -1,12 +1,16 @@
|
|||
import Product from "./products";
|
||||
import PropTypes from "prop-types";
|
||||
|
||||
export default function ProductCollection({ loading, items }) {
|
||||
import styles from "./productCollection.module.css";
|
||||
|
||||
export default function ProductCollection({ loading, items, cart, setCart }) {
|
||||
return (
|
||||
<div>
|
||||
<div className={styles.container}>
|
||||
{!loading
|
||||
? items.map((item, index) => {
|
||||
return <Product item={item} key={index} />;
|
||||
return (
|
||||
<Product item={item} key={index} cart={cart} setCart={setCart} />
|
||||
);
|
||||
})
|
||||
: null}
|
||||
</div>
|
||||
|
@ -16,4 +20,6 @@ export default function ProductCollection({ loading, items }) {
|
|||
ProductCollection.propTypes = {
|
||||
loading: PropTypes.bool,
|
||||
items: PropTypes.array,
|
||||
cart: PropTypes.object,
|
||||
setCart: PropTypes.func,
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue