@riosst100/pwa-marketplace 1.3.9 → 1.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/componentOverrideMapping.js +4 -1
- package/src/components/AttributesBlock/attributesBlock.js +54 -0
- package/src/components/AttributesBlock/attributesBlock.module.css +28 -0
- package/src/components/BrandSlider/brandSlider.js +91 -0
- package/src/components/BrandSlider/index.js +1 -0
- package/src/components/BrandSlider/item.js +43 -0
- package/src/components/CollectibleGameSets/collectibleGameSets.js +52 -0
- package/src/components/CollectibleGameSets/index.js +1 -0
- package/src/components/CollectibleGameSetsPage/collectibleGameSetsPage.js +10 -0
- package/src/components/CollectibleGameSetsPage/index.js +1 -0
- package/src/components/Divider/index.js +11 -0
- package/src/components/SellerDetail/sellerDetail.js +1 -1
- package/src/components/SellerReviewItem/sellerReviewItem.js +51 -51
- package/src/components/SubCategory/subCategory.js +1 -1
- package/src/intercept.js +7 -0
- package/src/overwrites/peregrine/lib/talons/MegaMenu/megaMenu.gql.js +24 -0
- package/src/overwrites/peregrine/lib/talons/RootComponents/Category/categoryContent.gql.js +8 -0
- package/src/overwrites/peregrine/lib/talons/RootComponents/Category/useCategoryContent.js +10 -1
- package/src/overwrites/venia-ui/lib/RootComponents/Category/category.module.css +1 -0
- package/src/overwrites/venia-ui/lib/RootComponents/Category/categoryContent.js +10 -1
- package/src/overwrites/venia-ui/lib/components/Button/button.js +100 -0
- package/src/overwrites/venia-ui/lib/components/Button/button.module.css +128 -0
- package/src/overwrites/venia-ui/lib/components/Button/index.js +1 -0
- package/src/overwrites/venia-ui/lib/components/FilterModal/FilterList/filterList.js +2 -2
- package/src/overwrites/venia-ui/lib/components/FilterSidebar/filterSidebar.module.css +2 -1
- package/src/overwrites/venia-ui/lib/components/Header/header.js +1 -1
- package/src/overwrites/venia-ui/lib/components/MegaMenu/customSubmenuColumn.js +55 -0
- package/src/overwrites/venia-ui/lib/components/MegaMenu/customSubmenuColumn.module.css +29 -0
- package/src/overwrites/venia-ui/lib/components/MegaMenu/megaMenuItem.js +6 -3
- package/src/overwrites/venia-ui/lib/components/MegaMenu/shopByColumn.js +51 -2
- package/src/overwrites/venia-ui/lib/components/MegaMenu/submenu.js +3 -20
- package/src/overwrites/venia-ui/lib/components/MegaMenu/submenu.module.css +2 -1
- package/src/overwrites/venia-ui/lib/components/MegaMenu/submenuColumn.js +62 -11
- package/src/overwrites/venia-ui/lib/components/MegaMenu/submenuColumn.module.css +5 -0
- package/src/overwrites/venia-ui/lib/components/ProductFullDetail/components/productReview.js +55 -0
- package/src/overwrites/venia-ui/lib/components/ProductFullDetail/productFullDetail.js +238 -46
- package/src/overwrites/venia-ui/lib/components/ProductFullDetail/productFullDetail.module.css +1 -5
- package/src/overwrites/venia-ui/lib/components/QuantityStepper/quantityStepper.js +23 -4
- package/src/overwrites/venia-ui/lib/components/QuantityStepper/quantityStepper.module.css +3 -7
- package/src/overwrites/venia-ui/lib/components/RadioGroup/radio.js +60 -0
- package/src/overwrites/venia-ui/lib/components/RadioGroup/radio.module.css +70 -0
- package/src/overwrites/venia-ui/lib/components/RichText/index.js +1 -0
- package/src/overwrites/venia-ui/lib/components/RichText/richText.js +21 -0
- package/src/overwrites/venia-ui/lib/components/RichText/richText.module.css +19 -0
- package/src/talons/AttributesBlock/attributesBlock.gql.js +15 -0
- package/src/talons/AttributesBlock/useAttributesBlock.js +37 -0
- package/src/talons/CollectibleGameSets/collectibleGameSets.gql.js +27 -0
- package/src/talons/CollectibleGameSets/useCollectibleGameSets.js +65 -0
- package/src/theme/vars.js +2 -0
package/package.json
CHANGED
|
@@ -35,5 +35,8 @@ module.exports = componentOverrideMapping = {
|
|
|
35
35
|
[`@magento/venia-ui/lib/components/ProductFullDetail/index.js`]: '@riosst100/pwa-marketplace/src/overwrites/venia-ui/lib/components/ProductFullDetail/index.js',
|
|
36
36
|
[`@magento/venia-ui/lib/components/ProductImageCarousel/index.js`]: '@riosst100/pwa-marketplace/src/overwrites/venia-ui/lib/components/ProductImageCarousel/index.js',
|
|
37
37
|
[`@magento/venia-ui/lib/components/QuantityStepper/index.js`]: '@riosst100/pwa-marketplace/src/overwrites/venia-ui/lib/components/QuantityStepper/index.js',
|
|
38
|
-
[`@magento/venia-ui/lib/components/RichContent/index.js`]: '@riosst100/pwa-marketplace/src/overwrites/venia-ui/lib/components/RichContent/index.js',
|
|
38
|
+
// [`@magento/venia-ui/lib/components/RichContent/index.js`]: '@riosst100/pwa-marketplace/src/overwrites/venia-ui/lib/components/RichContent/index.js',
|
|
39
|
+
[`@magento/venia-ui/lib/components/RadioGroup/radio.js`]: '@riosst100/pwa-marketplace/src/overwrites/venia-ui/lib/components/RadioGroup/radio.js',
|
|
40
|
+
[`@magento/venia-ui/lib/components/Button/index.js`]: '@riosst100/pwa-marketplace/src/overwrites/venia-ui/lib/components/Button/index.js',
|
|
41
|
+
[`@magento/venia-ui/lib/components/RichText/index.js`]: '@riosst100/pwa-marketplace/src/overwrites/venia-ui/lib/components/RichText/index.js',
|
|
39
42
|
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { useAttributesBlock } from '@riosst100/pwa-marketplace/src/talons/AttributesBlock/useAttributesBlock';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { Link } from 'react-router-dom';
|
|
4
|
+
import resourceUrl from '@magento/peregrine/lib/util/makeUrl';
|
|
5
|
+
import defaultClasses from './attributesBlock.module.css';
|
|
6
|
+
import { useStyle } from '@magento/venia-ui/lib/classify';
|
|
7
|
+
|
|
8
|
+
const AttributesBlock = props => {
|
|
9
|
+
const { attributesBlock, category } = props;
|
|
10
|
+
|
|
11
|
+
const talonProps = useAttributesBlock({ attributesBlock });
|
|
12
|
+
|
|
13
|
+
const classes = useStyle(defaultClasses, props.classes);
|
|
14
|
+
|
|
15
|
+
const {
|
|
16
|
+
categoryUrlSuffix,
|
|
17
|
+
getPath
|
|
18
|
+
} = talonProps;
|
|
19
|
+
|
|
20
|
+
const result = [];
|
|
21
|
+
|
|
22
|
+
attributesBlock && attributesBlock.map(({ label, code, items }, index) => {
|
|
23
|
+
|
|
24
|
+
const itemsResult = [];
|
|
25
|
+
|
|
26
|
+
items && items.map(({ label, value }, index) => {
|
|
27
|
+
const path = resourceUrl(
|
|
28
|
+
`/${category.url_path}${categoryUrlSuffix || ''}?${code}[filter]=${label},${value}`
|
|
29
|
+
);
|
|
30
|
+
|
|
31
|
+
itemsResult.push(
|
|
32
|
+
<>
|
|
33
|
+
<Link
|
|
34
|
+
key={index}
|
|
35
|
+
to={path}
|
|
36
|
+
>
|
|
37
|
+
<li className={classes.item}>{label}</li>
|
|
38
|
+
</Link>
|
|
39
|
+
</>
|
|
40
|
+
)
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
result.push(
|
|
44
|
+
<>
|
|
45
|
+
<div className={classes.title}>{label}</div>
|
|
46
|
+
<ul className={classes.root}>{itemsResult}</ul>
|
|
47
|
+
</>
|
|
48
|
+
)
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
return result;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
export default AttributesBlock;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
.root {
|
|
2
|
+
composes: flex from global;
|
|
3
|
+
composes: flex-wrap from global;
|
|
4
|
+
composes: mt-3 from global;
|
|
5
|
+
composes: gap-[15px] from global;
|
|
6
|
+
margin-bottom: 30px;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.item {
|
|
10
|
+
composes: px-4 from global;
|
|
11
|
+
composes: py-2 from global;
|
|
12
|
+
composes: transition-colors from global;
|
|
13
|
+
composes: duration-150 from global;
|
|
14
|
+
composes: border from global;
|
|
15
|
+
composes: border-solid from global;
|
|
16
|
+
composes: leading-normal from global;
|
|
17
|
+
composes: text-base from global;
|
|
18
|
+
composes: text-colorDefault from global;
|
|
19
|
+
composes: bg-white from global;
|
|
20
|
+
composes: border-gray-100 from global;
|
|
21
|
+
border-radius: 5px;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.title {
|
|
25
|
+
composes: pb-3 from global;
|
|
26
|
+
composes: font-bold from global;
|
|
27
|
+
composes: text-[14px] from global;
|
|
28
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Slider from "react-slick";
|
|
3
|
+
import { ArrowLeft2, ArrowRight2 } from 'iconsax-react';
|
|
4
|
+
import cn from 'classnames';
|
|
5
|
+
import Item from './item';
|
|
6
|
+
import { primary900 } from '@riosst100/pwa-marketplace/src/theme/vars';
|
|
7
|
+
|
|
8
|
+
const CustomArrow = (props) => {
|
|
9
|
+
const { isNext = true, onClick, className } = props;
|
|
10
|
+
return (
|
|
11
|
+
<span
|
|
12
|
+
className={cn(
|
|
13
|
+
className,
|
|
14
|
+
'custom_arrow rounded-full w-10 h-10 p-2.5 bg-white hover_!bg-white z-[1] !border !border-solid !border-gray-100 before_hidden',
|
|
15
|
+
isNext ? 'right-2 lg_right-4' : 'left-2 lg_left-4',
|
|
16
|
+
)}
|
|
17
|
+
onClick={onClick}
|
|
18
|
+
>
|
|
19
|
+
{isNext ? (
|
|
20
|
+
<ArrowRight2 className='' size="20" color={primary900} />
|
|
21
|
+
) : (
|
|
22
|
+
<ArrowLeft2 size="20" color={primary900} />
|
|
23
|
+
)}
|
|
24
|
+
</span>
|
|
25
|
+
)
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const brandSlider = (props) => {
|
|
29
|
+
|
|
30
|
+
const settings = {
|
|
31
|
+
dots: false,
|
|
32
|
+
infinite: false,
|
|
33
|
+
speed: 500,
|
|
34
|
+
slidesToShow: 5,
|
|
35
|
+
slidesToScroll: 1,
|
|
36
|
+
nextArrow: <CustomArrow />,
|
|
37
|
+
prevArrow: <CustomArrow isNext={false} />,
|
|
38
|
+
centerPadding: "60px",
|
|
39
|
+
responsive: [
|
|
40
|
+
{
|
|
41
|
+
breakpoint: 1023,
|
|
42
|
+
settings: {
|
|
43
|
+
slidesToShow: 4,
|
|
44
|
+
slidesToScroll: 1,
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
breakpoint: 767,
|
|
49
|
+
settings: {
|
|
50
|
+
slidesToShow: 3,
|
|
51
|
+
slidesToScroll: 1,
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
breakpoint: 576,
|
|
56
|
+
settings: {
|
|
57
|
+
slidesToShow: 2,
|
|
58
|
+
slidesToScroll: 1
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
]
|
|
62
|
+
};
|
|
63
|
+
return (
|
|
64
|
+
<div className='brand_items-container flex flex-col gap-x-4 gap-y-5'>
|
|
65
|
+
<div className='text-[18px] font-medium'>
|
|
66
|
+
Shop by brands
|
|
67
|
+
</div>
|
|
68
|
+
<Slider {...settings}>
|
|
69
|
+
{[...Array(9)].map(() => {
|
|
70
|
+
return (
|
|
71
|
+
<Item />
|
|
72
|
+
)
|
|
73
|
+
})}
|
|
74
|
+
</Slider>
|
|
75
|
+
<style global jsx>
|
|
76
|
+
{`
|
|
77
|
+
.brand_items-container .slick-slider {
|
|
78
|
+
margin: 0 -8px;
|
|
79
|
+
}
|
|
80
|
+
@media only screen and (min-width: 1024px) {
|
|
81
|
+
.brand_items-container .slick-slider {
|
|
82
|
+
margin: 0 -16px;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
`}
|
|
86
|
+
</style>
|
|
87
|
+
</div>
|
|
88
|
+
)
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export default brandSlider
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './brandSlider';
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import cn from 'classnames';
|
|
3
|
+
|
|
4
|
+
const Item = () => {
|
|
5
|
+
return (
|
|
6
|
+
<div className='brand-item-container px-2 lg_px-4'>
|
|
7
|
+
<div
|
|
8
|
+
className={cn(
|
|
9
|
+
'm-auto flex flex-col',
|
|
10
|
+
'w-full max-w-[250px]',
|
|
11
|
+
'relative rounded-lg border border-gray-100',
|
|
12
|
+
)}
|
|
13
|
+
>
|
|
14
|
+
<div className="brand_logo-wrapper w-full min-h-[120px] rounded-t-lg">
|
|
15
|
+
|
|
16
|
+
</div>
|
|
17
|
+
<div
|
|
18
|
+
className={cn(
|
|
19
|
+
'bg-darkblue-900 text-white uppercase text-lg font-bold leading-5 absolute',
|
|
20
|
+
'p-5 rounded-md top-1/2 left-1/2 -translate-y-1/2 -translate-x-1/2'
|
|
21
|
+
)}
|
|
22
|
+
>
|
|
23
|
+
TN
|
|
24
|
+
</div>
|
|
25
|
+
<div className='brand_name-wrapper flex items-center justify-center w-full min-h-[110px]'>
|
|
26
|
+
<span className='text-base font-medium'>
|
|
27
|
+
Tamashii Nations
|
|
28
|
+
</span>
|
|
29
|
+
</div>
|
|
30
|
+
<style global jsx>
|
|
31
|
+
{`
|
|
32
|
+
.brand_logo-wrapper {
|
|
33
|
+
background: rgb(217, 217, 217);
|
|
34
|
+
background: linear-gradient(180deg, rgb(217, 217, 217) 0%, rgba(217, 217, 217, 0) 100%);
|
|
35
|
+
}
|
|
36
|
+
`}
|
|
37
|
+
</style>
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
40
|
+
)
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export default Item;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import React, { Fragment } from 'react';
|
|
2
|
+
import { FormattedMessage } from 'react-intl';
|
|
3
|
+
import { useSeller } from '@riosst100/pwa-marketplace/src/talons/Seller/useSeller';
|
|
4
|
+
import ErrorView from '@magento/venia-ui/lib/components/ErrorView';
|
|
5
|
+
import { StoreTitle, Meta } from '@magento/venia-ui/lib/components/Head';
|
|
6
|
+
import { useCollectibleGameSets } from '@riosst100/pwa-marketplace/src/talons/CollectibleGameSets/useCollectibleGameSets';
|
|
7
|
+
|
|
8
|
+
const CollectibleGameSets = props => {
|
|
9
|
+
const talonProps = useCollectibleGameSets();
|
|
10
|
+
|
|
11
|
+
const { error, loading, collectibleGameSets } = talonProps;
|
|
12
|
+
|
|
13
|
+
if (loading && !collectibleGameSets)
|
|
14
|
+
return '';
|
|
15
|
+
// return <SellerShimmer />;
|
|
16
|
+
if (error && !collectibleGameSets) return <ErrorView />;
|
|
17
|
+
|
|
18
|
+
if (!collectibleGameSets) {
|
|
19
|
+
return (
|
|
20
|
+
<h1>
|
|
21
|
+
<FormattedMessage
|
|
22
|
+
id={'seller.notFound'}
|
|
23
|
+
defaultMessage={
|
|
24
|
+
'Seller Not Found.'
|
|
25
|
+
}
|
|
26
|
+
/>
|
|
27
|
+
</h1>
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// console.log('SIPPPPPPPPPPPPPPPPPPP')
|
|
32
|
+
// console.log(collectibleGameSets)
|
|
33
|
+
|
|
34
|
+
const sets = collectibleGameSets.map((set, index) => {
|
|
35
|
+
const { card_set } = set;
|
|
36
|
+
return (
|
|
37
|
+
<>
|
|
38
|
+
<div><b>{card_set}</b></div>
|
|
39
|
+
</>
|
|
40
|
+
);
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
return (
|
|
45
|
+
<Fragment>
|
|
46
|
+
<StoreTitle>Magic: The Gathering | All Sets</StoreTitle>
|
|
47
|
+
<div>{sets}</div>
|
|
48
|
+
</Fragment>
|
|
49
|
+
);
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
export default CollectibleGameSets;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './collectibleGameSets';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import CollectibleGameSets from '@riosst100/pwa-marketplace/src/components/CollectibleGameSets/collectibleGameSets';
|
|
3
|
+
|
|
4
|
+
const CollectibleGameSetsPage = () => {
|
|
5
|
+
return (
|
|
6
|
+
<CollectibleGameSets />
|
|
7
|
+
)
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export default CollectibleGameSetsPage;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './collectibleGameSetsPage';
|
|
@@ -3,61 +3,61 @@ import { Star1 } from 'iconsax-react';
|
|
|
3
3
|
|
|
4
4
|
const SellerReviewItem = ({ review }) => {
|
|
5
5
|
const rate1 = [];
|
|
6
|
-
if (review.rate1) {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
6
|
+
// if (review.rate1) {
|
|
7
|
+
// for (let i = 1; i < review.rate1+1; i++) {
|
|
8
|
+
// rate1.push({
|
|
9
|
+
// 'num': i,
|
|
10
|
+
// 'star': true
|
|
11
|
+
// });
|
|
12
|
+
// }
|
|
13
|
+
|
|
14
|
+
// if (review.rate1 < 5) {
|
|
15
|
+
// for (let i = review.rate1+1; i < 5+1; i++) {
|
|
16
|
+
// rate1.push({
|
|
17
|
+
// 'num': i,
|
|
18
|
+
// 'star': false
|
|
19
|
+
// });
|
|
20
|
+
// }
|
|
21
|
+
// }
|
|
22
|
+
// }
|
|
23
23
|
|
|
24
24
|
const rate2 = [];
|
|
25
|
-
if (review.rate2) {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}
|
|
25
|
+
// if (review.rate2) {
|
|
26
|
+
// for (let i = 1; i < review.rate2+1; i++) {
|
|
27
|
+
// rate2.push({
|
|
28
|
+
// 'num': i,
|
|
29
|
+
// 'star': true
|
|
30
|
+
// });
|
|
31
|
+
// }
|
|
32
|
+
|
|
33
|
+
// if (review.rate2 < 5) {
|
|
34
|
+
// for (let i = review.rate2+1; i < 5+1; i++) {
|
|
35
|
+
// rate2.push({
|
|
36
|
+
// 'num': i,
|
|
37
|
+
// 'star': false
|
|
38
|
+
// });
|
|
39
|
+
// }
|
|
40
|
+
// }
|
|
41
|
+
// }
|
|
42
42
|
|
|
43
43
|
const rate3 = [];
|
|
44
|
-
if (review.rate3) {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
}
|
|
44
|
+
// if (review.rate3) {
|
|
45
|
+
// for (let i = 1; i < review.rate3+1; i++) {
|
|
46
|
+
// rate3.push({
|
|
47
|
+
// 'num': i,
|
|
48
|
+
// 'star': true
|
|
49
|
+
// });
|
|
50
|
+
// }
|
|
51
|
+
|
|
52
|
+
// if (review.rate3 < 5) {
|
|
53
|
+
// for (let i = review.rate3+1; i < 5+1; i++) {
|
|
54
|
+
// rate3.push({
|
|
55
|
+
// 'num': i,
|
|
56
|
+
// 'star': false
|
|
57
|
+
// });
|
|
58
|
+
// }
|
|
59
|
+
// }
|
|
60
|
+
// }
|
|
61
61
|
|
|
62
62
|
const formatDate = (date) => {
|
|
63
63
|
const isoFormattedDate = date.replace(' ', 'T');
|
package/src/intercept.js
CHANGED
|
@@ -96,6 +96,13 @@ module.exports = targets => {
|
|
|
96
96
|
path: require.resolve("./components/SellerPage/index.js"),
|
|
97
97
|
authed: false,
|
|
98
98
|
},
|
|
99
|
+
{
|
|
100
|
+
exact: true,
|
|
101
|
+
name: "CollectibleGameSetsPage",
|
|
102
|
+
pattern: "/games/collectible-game/:urlKey/sets",
|
|
103
|
+
path: require.resolve("./components/CollectibleGameSetsPage/index.js"),
|
|
104
|
+
authed: false,
|
|
105
|
+
},
|
|
99
106
|
];
|
|
100
107
|
|
|
101
108
|
// Apply DefinePlugin using the results of the asynchronous operation
|
|
@@ -22,6 +22,14 @@ export const GET_MEGA_MENU = gql`
|
|
|
22
22
|
name
|
|
23
23
|
position
|
|
24
24
|
url_path
|
|
25
|
+
custom_submenu {
|
|
26
|
+
name
|
|
27
|
+
attribute {
|
|
28
|
+
code
|
|
29
|
+
value
|
|
30
|
+
}
|
|
31
|
+
path
|
|
32
|
+
}
|
|
25
33
|
shop_by {
|
|
26
34
|
name
|
|
27
35
|
code
|
|
@@ -38,6 +46,14 @@ export const GET_MEGA_MENU = gql`
|
|
|
38
46
|
name
|
|
39
47
|
position
|
|
40
48
|
url_path
|
|
49
|
+
custom_submenu {
|
|
50
|
+
name
|
|
51
|
+
attribute {
|
|
52
|
+
code
|
|
53
|
+
value
|
|
54
|
+
}
|
|
55
|
+
path
|
|
56
|
+
}
|
|
41
57
|
shop_by {
|
|
42
58
|
name
|
|
43
59
|
items {
|
|
@@ -52,6 +68,14 @@ export const GET_MEGA_MENU = gql`
|
|
|
52
68
|
name
|
|
53
69
|
position
|
|
54
70
|
url_path
|
|
71
|
+
custom_submenu {
|
|
72
|
+
name
|
|
73
|
+
attribute {
|
|
74
|
+
code
|
|
75
|
+
value
|
|
76
|
+
}
|
|
77
|
+
path
|
|
78
|
+
}
|
|
55
79
|
shop_by {
|
|
56
80
|
name
|
|
57
81
|
items {
|
|
@@ -91,6 +91,9 @@ export const useCategoryContent = props => {
|
|
|
91
91
|
categoryData && categoryData.categories.items.length
|
|
92
92
|
? categoryData.categories.items[0].children
|
|
93
93
|
: null;
|
|
94
|
+
const attributesBlock = categoryData && categoryData.categories.items.length
|
|
95
|
+
? categoryData.categories.items[0].attributes_block
|
|
96
|
+
: null;
|
|
94
97
|
const parent =
|
|
95
98
|
categoryData && categoryData.categories.items.length
|
|
96
99
|
? categoryData.categories.items[0].parent
|
|
@@ -99,6 +102,10 @@ export const useCategoryContent = props => {
|
|
|
99
102
|
? data.products.page_info.total_pages
|
|
100
103
|
: null;
|
|
101
104
|
const totalCount = data ? data.products.total_count : null;
|
|
105
|
+
const category =
|
|
106
|
+
categoryData && categoryData.categories.items.length
|
|
107
|
+
? categoryData.categories.items[0]
|
|
108
|
+
: null;
|
|
102
109
|
const categoryName =
|
|
103
110
|
categoryData && categoryData.categories.items.length
|
|
104
111
|
? categoryData.categories.items[0].name
|
|
@@ -134,6 +141,8 @@ export const useCategoryContent = props => {
|
|
|
134
141
|
totalCount,
|
|
135
142
|
totalPagesFromData,
|
|
136
143
|
children,
|
|
137
|
-
parent
|
|
144
|
+
parent,
|
|
145
|
+
attributesBlock,
|
|
146
|
+
category
|
|
138
147
|
};
|
|
139
148
|
};
|
|
@@ -25,6 +25,9 @@ import NoProductsFound from './NoProductsFound';
|
|
|
25
25
|
import cn from 'classnames';
|
|
26
26
|
import ProductListTab, { ProductListTabShimmer } from '@riosst100/pwa-marketplace/src/components/ProductListTab';
|
|
27
27
|
import SubCategory from '@riosst100/pwa-marketplace/src/components/SubCategory/subCategory';
|
|
28
|
+
import AttributesBlock from '@riosst100/pwa-marketplace/src/components/AttributesBlock/attributesBlock';
|
|
29
|
+
|
|
30
|
+
import BrandSlider from '@riosst100/pwa-marketplace/src/components/BrandSlider';
|
|
28
31
|
|
|
29
32
|
const FilterModal = React.lazy(() => import('@magento/venia-ui/lib/components/FilterModal'));
|
|
30
33
|
const FilterSidebar = React.lazy(() =>
|
|
@@ -56,7 +59,9 @@ const CategoryContent = props => {
|
|
|
56
59
|
items,
|
|
57
60
|
children,
|
|
58
61
|
totalCount,
|
|
59
|
-
totalPagesFromData
|
|
62
|
+
totalPagesFromData,
|
|
63
|
+
attributesBlock,
|
|
64
|
+
category
|
|
60
65
|
} = talonProps;
|
|
61
66
|
|
|
62
67
|
const sidebarRef = useRef(null);
|
|
@@ -179,6 +184,10 @@ const CategoryContent = props => {
|
|
|
179
184
|
{categoryDescriptionElement}
|
|
180
185
|
</div>
|
|
181
186
|
<SubCategory children={children} />
|
|
187
|
+
<AttributesBlock category={category} attributesBlock={attributesBlock} />
|
|
188
|
+
<section className='category_brand-slider my-5'>
|
|
189
|
+
<BrandSlider />
|
|
190
|
+
</section>
|
|
182
191
|
<div className={classes.contentWrapper}>
|
|
183
192
|
<div ref={sidebarRef} className={classes.sidebar}>
|
|
184
193
|
<Suspense fallback={<FilterSidebarShimmer />}>
|