fixed some bugs and clean up
This commit was merged in pull request #99.
This commit is contained in:
@@ -1,8 +1,5 @@
|
||||
import React, { useEffect, useState } from "react";
|
||||
//import ProductCardStyleTwo from "../Cards/ProductCardStyleTwo";
|
||||
import DataIteration from "../Helpers/DataIteration";
|
||||
// import SearchCom from "../Helpers/SearchCom";
|
||||
// import ActiveJobsCard from "../Cards/ActiveJobsCard";
|
||||
import AvailableJobsCard from "../Cards/AvailableJobsCard";
|
||||
|
||||
export default function MainSection({ className, marketPlaceProduct }) {
|
||||
@@ -13,13 +10,13 @@ export default function MainSection({ className, marketPlaceProduct }) {
|
||||
};
|
||||
useEffect(() => {
|
||||
if (tab === "artist") {
|
||||
setProducts(marketPlaceProduct.slice(0, 3));
|
||||
setProducts(marketPlaceProduct?.slice(0, 3));
|
||||
} else if (tab === "market") {
|
||||
setProducts(marketPlaceProduct.slice(0, 6));
|
||||
setProducts(marketPlaceProduct?.slice(0, 6));
|
||||
} else if (tab === "shop") {
|
||||
setProducts(marketPlaceProduct.slice(6, 9));
|
||||
setProducts(marketPlaceProduct?.slice(6, 9));
|
||||
} else if (tab === "assets") {
|
||||
setProducts(marketPlaceProduct.slice(3, 6));
|
||||
setProducts(marketPlaceProduct?.slice(3, 6));
|
||||
} else {
|
||||
setProducts(marketPlaceProduct);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user