|
| 1 | +import React from "react"; |
| 2 | + |
| 3 | +import ShopSidebar from "../components/ShopSideBar"; |
| 4 | +import ShopFilter from "../components/ShopFilter"; |
| 5 | + |
| 6 | +const Shop = () => { |
| 7 | + <div className="col-sm-12 col-md-6 col-lg-4 p-b-50" key={index}> |
| 8 | + <div className="block2"> |
| 9 | + <div className="block2-img wrap-pic-w of-hidden pos-relative"> |
| 10 | + {/* <img src={product.thumbnail} alt={product.name} /> */} |
| 11 | + |
| 12 | + <div className="block2-overlay trans-0-4"> |
| 13 | + <a href="#" className="block2-btn-addwishlist hov-pointer trans-0-4"> |
| 14 | + <i className="icon-wishlist icon_heart_alt" aria-hidden="true" /> |
| 15 | + <i |
| 16 | + className="icon-wishlist icon_heart dis-none" |
| 17 | + aria-hidden="true" |
| 18 | + /> |
| 19 | + </a> |
| 20 | + <div className="block2-btn-addcart w-size1 trans-0-4"> |
| 21 | + <button className="flex-c-m size1 bg4 bo-rad-23 hov1 s-text1 trans-0-4"> |
| 22 | + Add to Cart |
| 23 | + </button> |
| 24 | + </div> |
| 25 | + </div> |
| 26 | + </div> |
| 27 | + |
| 28 | + <div className="block2-txt p-t-20"> |
| 29 | + <a className="block2-name dis-block s-text3 p-b-5">{product.name}</a> |
| 30 | + |
| 31 | + {/* <span className='block2-price m-text6 p-r-5'>${product.price}</span> */} |
| 32 | + </div> |
| 33 | + </div> |
| 34 | + </div>; |
| 35 | + |
| 36 | + return ( |
| 37 | + <main> |
| 38 | + <section className="bgwhite p-t-55 p-b-65"> |
| 39 | + <div className="container"> |
| 40 | + <div className="row"> |
| 41 | + <div className="col-sm-6 col-md-4 col-lg-3 p-b-50"> |
| 42 | + {/* <ShopSidebar /> */} |
| 43 | + </div> |
| 44 | + |
| 45 | + <div className="col-sm-6 col-md-8 col-lg-9 p-b-50"> |
| 46 | + {/* <ShopFilter totalItems={totalItems} /> |
| 47 | +
|
| 48 | + <div className='row'>{productList}</div> */} |
| 49 | + |
| 50 | + {/* <Pagination |
| 51 | + currentPage={currentPage} |
| 52 | + totalItems={totalItems} |
| 53 | + numberItemsPerPage={limit} |
| 54 | + sort={sort} |
| 55 | + order={order} |
| 56 | + /> */} |
| 57 | + </div> |
| 58 | + </div> |
| 59 | + </div> |
| 60 | + </section> |
| 61 | + </main> |
| 62 | + ); |
| 63 | +}; |
| 64 | + |
| 65 | +// Shop.getInitialProps = async function({ query }) { |
| 66 | +// const page = query.page || 1; |
| 67 | +// const limit = 12; |
| 68 | +// const sort = query.sort || 'id'; |
| 69 | +// const order = query.order || 'desc'; |
| 70 | +// const res = await fetch( |
| 71 | +// `${apiProducts}?_sort=${sort}&_order=${order}&_page=${page}&_limit=${limit}` |
| 72 | +// ); |
| 73 | +// const data = await res.json(); |
| 74 | + |
| 75 | +// return { |
| 76 | +// products: data, |
| 77 | +// totalItems: res.headers.get('X-Total-Count'), |
| 78 | +// currentPage: page, |
| 79 | +// limit: limit, |
| 80 | +// sort: sort, |
| 81 | +// order: order |
| 82 | +// }; |
| 83 | +// }; |
| 84 | + |
| 85 | +export default Shop; |
0 commit comments