mirror of
https://gitea.smigz.com/smiggiddy/odin-codeprojects.git
synced 2025-07-16 22:30:37 -04:00
added cart and store components
This commit is contained in:
parent
556a7f8fe2
commit
81d70ec032
13 changed files with 254 additions and 54 deletions
19
shopping-cart/src/components/productCollection.jsx
Normal file
19
shopping-cart/src/components/productCollection.jsx
Normal file
|
@ -0,0 +1,19 @@
|
|||
import Product from "./products";
|
||||
import PropTypes from "prop-types";
|
||||
|
||||
export default function ProductCollection({ loading, items }) {
|
||||
return (
|
||||
<div>
|
||||
{!loading
|
||||
? items.map((item, index) => {
|
||||
return <Product item={item} key={index} />;
|
||||
})
|
||||
: null}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
ProductCollection.propTypes = {
|
||||
loading: PropTypes.bool,
|
||||
items: PropTypes.array,
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue