@riosst100/pwa-marketplace 2.3.3 → 2.3.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@riosst100/pwa-marketplace",
3
3
  "author": "riosst100@gmail.com",
4
- "version": "2.3.3",
4
+ "version": "2.3.4",
5
5
  "main": "src/index.js",
6
6
  "pwa-studio": {
7
7
  "targets": {
@@ -0,0 +1 @@
1
+ export { default } from './productContent';
@@ -0,0 +1,234 @@
1
+ import React, { useRef, Suspense, useState, useMemo, Fragment } from 'react';
2
+ import ProductItem from '@riosst100/pwa-marketplace/src/components/ProductItem';
3
+ import Filter from '@riosst100/pwa-marketplace/src/components/Filter';
4
+ import Search from '@riosst100/pwa-marketplace/src/components/Search';
5
+ import SortBy from '@riosst100/pwa-marketplace/src/components/SortBy';
6
+ import { useStyle } from '@magento/venia-ui/lib/classify';
7
+ import { Link } from "react-router-dom";
8
+ import { FilterSidebarShimmer } from '@magento/venia-ui/lib/components/FilterSidebar';
9
+ import { useIsInViewport } from '@magento/peregrine/lib/hooks/useIsInViewport';
10
+ import defaultClasses from '@riosst100/pwa-marketplace/src/overwrites/venia-ui/lib/RootComponents/Category/category.module.css';
11
+ import { useProductContent } from '@riosst100/pwa-marketplace/src/talons/ProductContent';
12
+ import cn from 'classnames';
13
+ import ProductListTab, { ProductListTabShimmer } from '@riosst100/pwa-marketplace/src/components/ProductListTab';
14
+ import FilterModalOpenButton, {
15
+ FilterModalOpenButtonShimmer
16
+ } from '@magento/venia-ui/lib/components/FilterModalOpenButton';
17
+ import ProductSort, { ProductSortShimmer } from '@riosst100/pwa-marketplace/src/overwrites/venia-ui/lib/components/ProductSort';
18
+ import SortedByContainer, {
19
+ SortedByContainerShimmer
20
+ } from '@magento/venia-ui/lib/components/SortedByContainer';
21
+ import Shimmer from '@magento/venia-ui/lib/components/Shimmer';
22
+ import { FormattedMessage } from 'react-intl';
23
+ import NoProductsFound from '@riosst100/pwa-marketplace/src/overwrites/venia-ui/lib/RootComponents/Category/NoProductsFound';
24
+ import Gallery, { GalleryShimmer } from '@magento/venia-ui/lib/components/Gallery';
25
+ import Pagination from '@riosst100/pwa-marketplace/src/overwrites/venia-ui/lib/components/Pagination';
26
+
27
+ const FilterSidebar = React.lazy(() =>
28
+ import('@magento/venia-ui/lib/components/FilterSidebar')
29
+ );
30
+
31
+ const ProductContent = props => {
32
+ const {
33
+ categoryId,
34
+ data,
35
+ pageControl,
36
+ sortProps,
37
+ isLoading,
38
+ pageSize
39
+ } = props;
40
+
41
+ const [currentSort] = sortProps;
42
+
43
+ const [activeTab, setActiveTab] = useState('all');
44
+ const [activeLetter, setActiveLetter] = useState('all')
45
+
46
+ const classes = useStyle(defaultClasses, props.classes);
47
+
48
+ const sidebarRef = useRef(null);
49
+
50
+ const shouldRenderSidebarContent = useIsInViewport({
51
+ elementRef: sidebarRef
52
+ });
53
+
54
+ const talonProps = useProductContent({
55
+ categoryId,
56
+ data,
57
+ pageSize
58
+ });
59
+
60
+ const {
61
+ availableSortMethods,
62
+ filters,
63
+ items,
64
+ totalPagesFromData
65
+ } = talonProps;
66
+
67
+ const shouldShowFilterButtons = filters && filters.length;
68
+ const shouldShowFilterShimmer = filters === null;
69
+
70
+ const sidebar = shouldShowFilterButtons ? (
71
+ <FilterSidebar hideFilters={false} children={[]} filters={filters} allowedFilters={[]} />
72
+ ) : shouldShowFilterShimmer ? (
73
+ <FilterSidebarShimmer />
74
+ ) : null;
75
+
76
+ const shouldShowProductListTabShimmer = !totalPagesFromData && isLoading;
77
+
78
+ const maybeProductsTabContainer = !isLoading ? (
79
+ <ProductListTab filters={filters} activeTab={activeTab} setActiveTab={setActiveTab} />
80
+ ) : shouldShowProductListTabShimmer ? (
81
+ <ProductListTabShimmer />
82
+ ) : null;
83
+
84
+ const maybeFilterButtons = shouldShowFilterButtons ? (
85
+ <FilterModalOpenButton filters={filters} />
86
+ ) : shouldShowFilterShimmer ? (
87
+ <FilterModalOpenButtonShimmer />
88
+ ) : null;
89
+
90
+ const shouldShowSortButtons = totalPagesFromData && availableSortMethods;
91
+ const shouldShowSortShimmer = !totalPagesFromData && isLoading;
92
+
93
+ const maybeSortButton = shouldShowSortButtons ? (
94
+ <ProductSort
95
+ sortProps={sortProps}
96
+ availableSortMethods={availableSortMethods}
97
+ />
98
+ ) : shouldShowSortShimmer ? (
99
+ <ProductSortShimmer />
100
+ ) : null;
101
+
102
+ const maybeSortContainer = shouldShowSortButtons ? (
103
+ <SortedByContainer currentSort={currentSort} />
104
+ ) : shouldShowSortShimmer ? (
105
+ <SortedByContainerShimmer />
106
+ ) : null;
107
+
108
+ const galleryItems = [];
109
+
110
+ useMemo(() => {
111
+ items && items.map((item, index) => {
112
+ if (item) {
113
+ let firstLetter = null;
114
+
115
+ const { custom_attributes } = item;
116
+ if (custom_attributes) {
117
+ let cardName = '';
118
+ custom_attributes.some((attribute, index) => {
119
+ const { attribute_metadata, entered_attribute_value, selected_attribute_options } = attribute
120
+ if (attribute_metadata.code == "card_name") {
121
+ cardName = selected_attribute_options.attribute_option[0].label;
122
+
123
+ return true;
124
+ }
125
+
126
+ return false;
127
+ });
128
+
129
+ if (cardName) {
130
+ firstLetter = cardName.charAt(0).toUpperCase();
131
+ }
132
+ }
133
+
134
+ if (activeLetter == "all" || activeLetter != "all" && firstLetter == activeLetter) {
135
+ return galleryItems.push(item);
136
+ }
137
+ }
138
+ }),
139
+ [items, activeLetter, activeTab]
140
+ });
141
+
142
+ const categoryResultsHeading =
143
+ galleryItems.length > 0 ? (
144
+ <FormattedMessage
145
+ id={'categoryContent.resultCount'}
146
+ values={{
147
+ count: galleryItems.length
148
+ }}
149
+ defaultMessage={'{count} Results'}
150
+ />
151
+ ) : isLoading ? (
152
+ <Shimmer width={5} />
153
+ ) : null;
154
+
155
+ const content = useMemo(() => {
156
+ if (!totalPagesFromData && !isLoading) {
157
+ return <NoProductsFound categoryId={categoryId} />;
158
+ }
159
+
160
+ const gallery = totalPagesFromData ? (
161
+ <Gallery items={galleryItems} activeLetter={activeLetter} />
162
+ ) : (
163
+ <GalleryShimmer items={galleryItems} />
164
+ );
165
+
166
+ const pagination = totalPagesFromData ? (
167
+ <Pagination pageControl={pageControl} />
168
+ ) : null;
169
+
170
+ return (
171
+ <Fragment>
172
+ <section className={classes.gallery}>{gallery}</section>
173
+ <div className={classes.pagination}>{pagination}</div>
174
+ </Fragment>
175
+ );
176
+ }, [
177
+ categoryId,
178
+ classes.gallery,
179
+ classes.pagination,
180
+ isLoading,
181
+ items,
182
+ pageControl,
183
+ totalPagesFromData,
184
+ activeLetter
185
+ ]);
186
+
187
+ return <><span>OK</span></>;
188
+
189
+ return (
190
+ <>
191
+ <div className='w-full mb-[30px]'>
192
+ <div class='flex items-end gap-[40px] px-[30px] py-0 rounded-[6px] border border-solid border-gray-100'>
193
+ <Link to='#' class='px-0 py-[12px] inline-flex items-center gap-[5px] relative flex-[0_0_auto]'>
194
+ <span class='relative w-fit font-medium text-[14px] tracking-[0] leading-[20px] whitespace-nowrap'>Action Figures</span>
195
+ </Link>
196
+ <Link to='#' class='px-0 py-[12px] inline-flex items-center gap-[5px] relative flex-[0_0_auto]'>
197
+ <span class='relative w-fit font-medium text-[14px] tracking-[0] leading-[20px] whitespace-nowrap'>Anime</span>
198
+ </Link>
199
+ </div>
200
+ </div>
201
+ <div className='w-full flex items-start gap-x-[30px]'>
202
+ <div className={classes.contentWrapper}>
203
+ <div ref={sidebarRef} className={classes.sidebar}>
204
+ <Suspense fallback={<FilterSidebarShimmer />}>
205
+ {shouldRenderSidebarContent ? sidebar : null}
206
+ </Suspense>
207
+ </div>
208
+ <div className={classes.categoryContent}>
209
+ <div className={cn(classes.heading)}>
210
+ {maybeProductsTabContainer}
211
+ <div className={classes.headerButtons}>
212
+ {maybeFilterButtons}
213
+ {maybeSortButton}
214
+ </div>
215
+ {maybeSortContainer}
216
+ </div>
217
+ <div className={cn(classes.heading)}>
218
+ <div
219
+ data-cy="CategoryContent-categoryInfo"
220
+ className={classes.categoryInfo}
221
+ >
222
+ {categoryResultsHeading}
223
+ </div>
224
+ </div>
225
+ {content}
226
+ <Suspense fallback={null}>{filtersModal}</Suspense>
227
+ </div>
228
+ </div>
229
+ </div>
230
+ </>
231
+ )
232
+ }
233
+
234
+ export default ProductContent;
@@ -53,7 +53,7 @@ const SellerDetail = props => {
53
53
  {
54
54
  id: 'product-tab',
55
55
  title: 'All Products',
56
- content: <SellerProducts seller={seller} />
56
+ content: <SellerProducts sellerId={seller?.seller_id} />
57
57
  },
58
58
  {
59
59
  id: 'store-information',
@@ -0,0 +1,238 @@
1
+ import React, { useRef, Suspense, useState, useMemo, Fragment } from 'react';
2
+ import ProductItem from '@riosst100/pwa-marketplace/src/components/ProductItem';
3
+ import Filter from '@riosst100/pwa-marketplace/src/components/Filter';
4
+ import Search from '@riosst100/pwa-marketplace/src/components/Search';
5
+ import SortBy from '@riosst100/pwa-marketplace/src/components/SortBy';
6
+ import { useStyle } from '@magento/venia-ui/lib/classify';
7
+ import { Link } from "react-router-dom";
8
+ import { FilterSidebarShimmer } from '@magento/venia-ui/lib/components/FilterSidebar';
9
+ import { useIsInViewport } from '@magento/peregrine/lib/hooks/useIsInViewport';
10
+ import defaultClasses from '@riosst100/pwa-marketplace/src/overwrites/venia-ui/lib/RootComponents/Category/category.module.css';
11
+ import { useProductContent } from '@riosst100/pwa-marketplace/src/talons/SellerProducts';
12
+ import cn from 'classnames';
13
+ import ProductListTab, { ProductListTabShimmer } from '@riosst100/pwa-marketplace/src/components/ProductListTab';
14
+ import FilterModalOpenButton, {
15
+ FilterModalOpenButtonShimmer
16
+ } from '@magento/venia-ui/lib/components/FilterModalOpenButton';
17
+ import ProductSort, { ProductSortShimmer } from '@riosst100/pwa-marketplace/src/overwrites/venia-ui/lib/components/ProductSort';
18
+ import SortedByContainer, {
19
+ SortedByContainerShimmer
20
+ } from '@magento/venia-ui/lib/components/SortedByContainer';
21
+ import Shimmer from '@magento/venia-ui/lib/components/Shimmer';
22
+ import { FormattedMessage } from 'react-intl';
23
+ import NoProductsFound from '@riosst100/pwa-marketplace/src/overwrites/venia-ui/lib/RootComponents/Category/NoProductsFound';
24
+ import Gallery, { GalleryShimmer } from '@magento/venia-ui/lib/components/Gallery';
25
+ import Pagination from '@riosst100/pwa-marketplace/src/overwrites/venia-ui/lib/components/Pagination';
26
+
27
+ const FilterSidebar = React.lazy(() =>
28
+ import('@magento/venia-ui/lib/components/FilterSidebar')
29
+ );
30
+
31
+ const FilterModal = React.lazy(() => import('@magento/venia-ui/lib/components/FilterModal'));
32
+
33
+ const ProductContent = props => {
34
+ const {
35
+ categoryId,
36
+ data,
37
+ pageControl,
38
+ sortProps,
39
+ isLoading,
40
+ pageSize
41
+ } = props;
42
+
43
+ const [currentSort] = sortProps;
44
+
45
+ const [activeTab, setActiveTab] = useState('all');
46
+ const [activeLetter, setActiveLetter] = useState('all')
47
+
48
+ const classes = useStyle(defaultClasses, props.classes);
49
+
50
+ const sidebarRef = useRef(null);
51
+
52
+ const shouldRenderSidebarContent = useIsInViewport({
53
+ elementRef: sidebarRef
54
+ });
55
+
56
+ const talonProps = useProductContent({
57
+ categoryId,
58
+ data,
59
+ pageSize
60
+ });
61
+
62
+ const {
63
+ availableSortMethods,
64
+ filters,
65
+ items,
66
+ totalPagesFromData
67
+ } = talonProps;
68
+
69
+ const shouldShowFilterButtons = filters && filters.length;
70
+ const shouldShowFilterShimmer = filters === null;
71
+
72
+ const sidebar = shouldShowFilterButtons ? (
73
+ <FilterSidebar hideFilters={false} children={[]} filters={filters} allowedFilters={[]} />
74
+ ) : shouldShowFilterShimmer ? (
75
+ <FilterSidebarShimmer />
76
+ ) : null;
77
+
78
+ const shouldShowProductListTabShimmer = !totalPagesFromData && isLoading;
79
+
80
+ const maybeProductsTabContainer = !isLoading ? (
81
+ <ProductListTab filters={filters} activeTab={activeTab} setActiveTab={setActiveTab} />
82
+ ) : shouldShowProductListTabShimmer ? (
83
+ <ProductListTabShimmer />
84
+ ) : null;
85
+
86
+ const maybeFilterButtons = shouldShowFilterButtons ? (
87
+ <FilterModalOpenButton filters={filters} />
88
+ ) : shouldShowFilterShimmer ? (
89
+ <FilterModalOpenButtonShimmer />
90
+ ) : null;
91
+
92
+ const shouldShowSortButtons = totalPagesFromData && availableSortMethods;
93
+ const shouldShowSortShimmer = !totalPagesFromData && isLoading;
94
+
95
+ const maybeSortButton = shouldShowSortButtons ? (
96
+ <ProductSort
97
+ sortProps={sortProps}
98
+ availableSortMethods={availableSortMethods}
99
+ />
100
+ ) : shouldShowSortShimmer ? (
101
+ <ProductSortShimmer />
102
+ ) : null;
103
+
104
+ const maybeSortContainer = shouldShowSortButtons ? (
105
+ <SortedByContainer currentSort={currentSort} />
106
+ ) : shouldShowSortShimmer ? (
107
+ <SortedByContainerShimmer />
108
+ ) : null;
109
+
110
+ const filtersModal = shouldShowFilterButtons ? (
111
+ <FilterModal filters={filters} />
112
+ ) : null;
113
+
114
+ const galleryItems = [];
115
+
116
+ useMemo(() => {
117
+ items && items.map((item, index) => {
118
+ if (item) {
119
+ let firstLetter = null;
120
+
121
+ const { custom_attributes } = item;
122
+ if (custom_attributes) {
123
+ let cardName = '';
124
+ custom_attributes.some((attribute, index) => {
125
+ const { attribute_metadata, entered_attribute_value, selected_attribute_options } = attribute
126
+ if (attribute_metadata.code == "card_name") {
127
+ cardName = selected_attribute_options.attribute_option[0].label;
128
+
129
+ return true;
130
+ }
131
+
132
+ return false;
133
+ });
134
+
135
+ if (cardName) {
136
+ firstLetter = cardName.charAt(0).toUpperCase();
137
+ }
138
+ }
139
+
140
+ if (activeLetter == "all" || activeLetter != "all" && firstLetter == activeLetter) {
141
+ return galleryItems.push(item);
142
+ }
143
+ }
144
+ }),
145
+ [items, activeLetter, activeTab]
146
+ });
147
+
148
+ const categoryResultsHeading =
149
+ galleryItems.length > 0 ? (
150
+ <FormattedMessage
151
+ id={'categoryContent.resultCount'}
152
+ values={{
153
+ count: galleryItems.length
154
+ }}
155
+ defaultMessage={'{count} Results'}
156
+ />
157
+ ) : isLoading ? (
158
+ <Shimmer width={5} />
159
+ ) : null;
160
+
161
+ const content = useMemo(() => {
162
+ if (!totalPagesFromData && !isLoading) {
163
+ return <NoProductsFound categoryId={categoryId} />;
164
+ }
165
+
166
+ const gallery = totalPagesFromData ? (
167
+ <Gallery items={galleryItems} activeLetter={activeLetter} />
168
+ ) : (
169
+ <GalleryShimmer items={galleryItems} />
170
+ );
171
+
172
+ const pagination = totalPagesFromData ? (
173
+ <Pagination pageControl={pageControl} />
174
+ ) : null;
175
+
176
+ return (
177
+ <Fragment>
178
+ <section className={classes.gallery}>{gallery}</section>
179
+ <div className={classes.pagination}>{pagination}</div>
180
+ </Fragment>
181
+ );
182
+ }, [
183
+ categoryId,
184
+ classes.gallery,
185
+ classes.pagination,
186
+ isLoading,
187
+ items,
188
+ pageControl,
189
+ totalPagesFromData,
190
+ activeLetter
191
+ ]);
192
+
193
+ return (
194
+ <>
195
+ <div className='w-full mb-[30px]'>
196
+ <div class='flex items-end gap-[40px] px-[30px] py-0 rounded-[6px] border border-solid border-gray-100'>
197
+ <Link to='#' class='px-0 py-[12px] inline-flex items-center gap-[5px] relative flex-[0_0_auto]'>
198
+ <span class='relative w-fit font-medium text-[14px] tracking-[0] leading-[20px] whitespace-nowrap'>Action Figures</span>
199
+ </Link>
200
+ <Link to='#' class='px-0 py-[12px] inline-flex items-center gap-[5px] relative flex-[0_0_auto]'>
201
+ <span class='relative w-fit font-medium text-[14px] tracking-[0] leading-[20px] whitespace-nowrap'>Anime</span>
202
+ </Link>
203
+ </div>
204
+ </div>
205
+ <div className='w-full flex items-start gap-x-[30px]'>
206
+ <div className={classes.contentWrapper}>
207
+ <div ref={sidebarRef} className={classes.sidebar}>
208
+ <Suspense fallback={<FilterSidebarShimmer />}>
209
+ {shouldRenderSidebarContent ? sidebar : null}
210
+ </Suspense>
211
+ </div>
212
+ <div className={classes.categoryContent}>
213
+ <div className={cn(classes.heading)}>
214
+ {maybeProductsTabContainer}
215
+ <div className={classes.headerButtons}>
216
+ {maybeFilterButtons}
217
+ {maybeSortButton}
218
+ </div>
219
+ {maybeSortContainer}
220
+ </div>
221
+ <div className={cn(classes.heading)}>
222
+ <div
223
+ data-cy="CategoryContent-categoryInfo"
224
+ className={classes.categoryInfo}
225
+ >
226
+ {categoryResultsHeading}
227
+ </div>
228
+ </div>
229
+ {content}
230
+ <Suspense fallback={null}>{filtersModal}</Suspense>
231
+ </div>
232
+ </div>
233
+ </div>
234
+ </>
235
+ )
236
+ }
237
+
238
+ export default ProductContent;
@@ -1,47 +1,110 @@
1
- import React from 'react';
2
- import ProductItem from '@riosst100/pwa-marketplace/src/components/ProductItem';
3
- import Filter from '@riosst100/pwa-marketplace/src/components/Filter';
4
- import Search from '@riosst100/pwa-marketplace/src/components/Search';
5
- import SortBy from '@riosst100/pwa-marketplace/src/components/SortBy';
6
- import Pagination from '..//Pagination';
7
- import { Link } from "react-router-dom";
8
-
9
- const SellerProducts = () => {
1
+ import React, { Fragment } from 'react';
2
+ import { shape, string } from 'prop-types';
3
+ import { useSellerProducts } from '@riosst100/pwa-marketplace/src/talons/SellerProducts';
4
+ import { useStyle } from '@magento/venia-ui/lib/classify';
5
+
6
+ import ProductContent from './productContent';
7
+ import defaultClasses from '@riosst100/pwa-marketplace/src/overwrites/venia-ui/lib/RootComponents/Category/category.module.css';
8
+ import { Meta } from '@magento/venia-ui/lib/components/Head';
9
+ import { GET_PAGE_SIZE } from '@magento/venia-ui/lib/RootComponents/Category/category.gql';
10
+ import ErrorView from '@magento/venia-ui/lib/components/ErrorView';
11
+ import { useIntl } from 'react-intl';
12
+ import ShopBy from '@riosst100/pwa-marketplace/src/components/ShopBy/shopBy';
13
+ import SubCategoryPage from '@riosst100/pwa-marketplace/src/components/CustomSubCategoryPage/subCategoryPage';
14
+ import ShopBySets from '@riosst100/pwa-marketplace/src/components/ShopBySets/shopBySets';
15
+ import ShopByCard from '@riosst100/pwa-marketplace/src/components/ShopByCard/shopByCard';
16
+ import { useLocation } from 'react-router-dom';
17
+ import SportCardsSets from '@riosst100/pwa-marketplace/src/components/SportCardsSets/sportCardsSets';
18
+ import NonSportCardsSets from '@riosst100/pwa-marketplace/src/components/NonSportCardsSets/nonSportCardsSets';
19
+ import LegoSets from '@riosst100/pwa-marketplace/src/components/LegoSets/legoSets';
20
+ import TrainsSets from '@riosst100/pwa-marketplace/src/components/TrainsSets/trainsSets';
21
+ import SetsData from '@riosst100/pwa-marketplace/src/components/SetsData/setsData';
22
+
23
+ const MESSAGES = new Map().set(
24
+ 'NOT_FOUND',
25
+ "Looks like the category you were hoping to find doesn't exist. Sorry about that."
26
+ );
27
+
28
+ const SellerProducts = props => {
29
+ const { sellerId } = props;
30
+
31
+ const uid = null;
32
+
33
+ const { formatMessage } = useIntl();
34
+
35
+ const { location } = globalThis;
36
+
37
+ const query = new URLSearchParams(location.search);
38
+ const shopby = query.get('shopby') || null;
39
+
40
+ const talonProps = useSellerProducts({
41
+ sellerId: sellerId,
42
+ queries: {
43
+ getPageSize: GET_PAGE_SIZE
44
+ }
45
+ });
46
+
47
+ const {
48
+ error,
49
+ loading,
50
+ productData,
51
+ pageControl,
52
+ sortProps,
53
+ pageSize,
54
+ categoryNotFound
55
+ } = talonProps;
56
+
57
+ const classes = useStyle(defaultClasses, props.classes);
58
+
59
+ if (!productData) {
60
+ if (error && pageControl.currentPage === 1) {
61
+ if (process.env.NODE_ENV !== 'production') {
62
+ console.error(error);
63
+ }
64
+
65
+ return <ErrorView />;
66
+ }
67
+ }
68
+
69
+ if (categoryNotFound) {
70
+ return (
71
+ <ErrorView
72
+ message={formatMessage({
73
+ id: 'category.notFound',
74
+ defaultMessage: MESSAGES.get('NOT_FOUND')
75
+ })}
76
+ />
77
+ );
78
+ }
79
+
10
80
  return (
11
- <>
12
- <div className='w-full mb-[30px]'>
13
- <div class='flex items-end gap-[40px] px-[30px] py-0 rounded-[6px] border border-solid border-gray-100'>
14
- <Link to='#' class='px-0 py-[12px] inline-flex items-center gap-[5px] relative flex-[0_0_auto]'>
15
- <span class='relative w-fit font-medium text-[14px] tracking-[0] leading-[20px] whitespace-nowrap'>Action Figures</span>
16
- </Link>
17
- <Link to='#' class='px-0 py-[12px] inline-flex items-center gap-[5px] relative flex-[0_0_auto]'>
18
- <span class='relative w-fit font-medium text-[14px] tracking-[0] leading-[20px] whitespace-nowrap'>Anime</span>
19
- </Link>
20
- </div>
21
- </div>
22
- <div className='w-full flex items-start gap-x-[30px]'>
23
- <div className='xs_hidden xl_block filter-container w-full max-w-[240px]'>
24
- <Filter />
25
- </div>
26
- <div className='flex flex-col gap-y-[30px]'>
27
- <div className='flex xs_flex-wrap gap-y-4 w-full items-center justify-between'>
28
- <Search />
29
- <SortBy />
30
- </div>
31
- <div className='product-list w-full grid xs_grid-cols-2 md_grid-cols-3 lg_grid-cols-4 gap-4'>
32
- <ProductItem />
33
- <ProductItem />
34
- <ProductItem />
35
- <ProductItem />
36
- <ProductItem />
37
- </div>
38
- <div className='pagination-container w-full flex justify-center'>
39
- <Pagination />
40
- </div>
41
- </div>
42
- </div>
43
- </>
44
- )
45
- }
46
-
47
- export default SellerProducts;
81
+ <Fragment>
82
+ <ProductContent
83
+ categoryId={uid}
84
+ sellerId={sellerId}
85
+ classes={classes}
86
+ data={productData?.productsBySellerId}
87
+ shopby={shopby}
88
+ isLoading={loading}
89
+ pageControl={pageControl}
90
+ sortProps={sortProps}
91
+ pageSize={pageSize}
92
+ />
93
+ </Fragment>
94
+ );
95
+ };
96
+
97
+ SellerProducts.propTypes = {
98
+ classes: shape({
99
+ gallery: string,
100
+ root: string,
101
+ title: string
102
+ }),
103
+ uid: string
104
+ };
105
+
106
+ SellerProducts.defaultProps = {
107
+ uid: 'Mg=='
108
+ };
109
+
110
+ export default SellerProducts;
@@ -57,6 +57,8 @@ const CategoryContent = props => {
57
57
 
58
58
  const history = useHistory();
59
59
 
60
+ console.log("categoryId: "+categoryId)
61
+
60
62
  const talonProps = useCategoryContent({
61
63
  categoryId,
62
64
  data,
@@ -0,0 +1 @@
1
+ export { useProductContent } from './useProductContent';