|
@@ -67,8 +67,8 @@ const ProductList = ({ size = 99999 }) => {
|
67
|
67
|
const navigate = useNavigate();
|
68
|
68
|
|
69
|
69
|
//filter
|
70
|
|
- const [tags, setTags] = useState("all");
|
71
|
|
- const [collection, setCollection] = useState("all");
|
|
70
|
+ const [tags, setTags] = useState("tag");
|
|
71
|
+ const [collection, setCollection] = useState("collection");
|
72
|
72
|
const [sort, setSort] = useState("new");
|
73
|
73
|
|
74
|
74
|
useEffect(() => {
|
|
@@ -119,7 +119,7 @@ const ProductList = ({ size = 99999 }) => {
|
119
|
119
|
|
120
|
120
|
// Tags
|
121
|
121
|
newFilteredProducts = newFilteredProducts.filter((product) => {
|
122
|
|
- if (tags == "all") {
|
|
122
|
+ if (tags == "all" || tags == "tag") {
|
123
|
123
|
return product.productType === productType;
|
124
|
124
|
} else {
|
125
|
125
|
return (
|
|
@@ -130,7 +130,7 @@ const ProductList = ({ size = 99999 }) => {
|
130
|
130
|
|
131
|
131
|
// Collection
|
132
|
132
|
newFilteredProducts = newFilteredProducts.filter((product) => {
|
133
|
|
- if (collection == "all") {
|
|
133
|
+ if (collection == "all" || collection == "collection" ) {
|
134
|
134
|
return product.productType === productType;
|
135
|
135
|
} else {
|
136
|
136
|
return (
|
|
@@ -384,6 +384,7 @@ const ProductList = ({ size = 99999 }) => {
|
384
|
384
|
input={<BootstrapInput />}
|
385
|
385
|
name="type"
|
386
|
386
|
>
|
|
387
|
+ <MenuItem value={"tag"}>Tags</MenuItem>
|
387
|
388
|
<MenuItem value={"all"}>All</MenuItem>
|
388
|
389
|
{tagFilterOption?.map((data) => (
|
389
|
390
|
<MenuItem value={data}>{data}</MenuItem>
|
|
@@ -411,6 +412,7 @@ const ProductList = ({ size = 99999 }) => {
|
411
|
412
|
input={<BootstrapInput />}
|
412
|
413
|
name="type"
|
413
|
414
|
>
|
|
415
|
+ <MenuItem value={"collection"}>Collection</MenuItem>
|
414
|
416
|
<MenuItem value={"all"}>All</MenuItem>
|
415
|
417
|
{collectionFilterOption?.map(({ title }) => (
|
416
|
418
|
<MenuItem value={title}>{title}</MenuItem>
|