@riosst100/pwa-marketplace 3.3.0 → 3.3.2

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.
Files changed (35) hide show
  1. package/package.json +1 -1
  2. package/src/components/AboutUs/aboutUs.css +111 -0
  3. package/src/components/AboutUs/aboutUs.js +6 -2
  4. package/src/components/AgeVerification/ageVerification.js +121 -0
  5. package/src/components/AgeVerification/index.js +1 -2
  6. package/src/components/AgeVerificationModal/ageVerificationModal.js +83 -0
  7. package/src/components/{AgeVerification → AgeVerificationModal}/ageVerificationModal.module.css +77 -10
  8. package/src/components/AgeVerificationModal/index.js +2 -0
  9. package/src/components/Messages/messages.js +0 -10
  10. package/src/components/PrivacyPolicy/index.js +1 -0
  11. package/src/components/PrivacyPolicy/privacyPolicy.css +125 -0
  12. package/src/components/PrivacyPolicy/privacyPolicy.js +13 -0
  13. package/src/components/RFQPage/quoteDetail.js +2 -3
  14. package/src/components/ShowMore/showMore.js +8 -5
  15. package/src/components/TermsOfUse/index.js +1 -0
  16. package/src/components/TermsOfUse/termsOfUse.css +113 -0
  17. package/src/components/TermsOfUse/termsOfUse.js +13 -0
  18. package/src/intercept.js +23 -0
  19. package/src/overwrites/peregrine/lib/talons/RootComponents/Category/useCategory.js +0 -4
  20. package/src/overwrites/venia-ui/lib/RootComponents/Category/category.js +2 -0
  21. package/src/overwrites/venia-ui/lib/RootComponents/Category/categoryContent.js +1 -1
  22. package/src/overwrites/venia-ui/lib/RootComponents/Product/product.js +2 -0
  23. package/src/overwrites/venia-ui/lib/components/Adapter/adapter.js +0 -23
  24. package/src/overwrites/venia-ui/lib/components/Footer/footer.js +2 -2
  25. package/src/overwrites/venia-ui/lib/components/ProductFullDetail/components/productFAQ.js +82 -0
  26. package/src/overwrites/venia-ui/lib/components/ProductFullDetail/productFullDetail.js +49 -42
  27. package/src/talons/AgeVerification/ageVerification.gql.js +31 -0
  28. package/src/talons/AgeVerification/useAgeVerification.js +126 -0
  29. package/src/talons/ProductFAQ/productFaq.gql.js +39 -0
  30. package/src/talons/ProductFAQ/useProductFAQ.js +48 -0
  31. package/src/talons/RFQ/useRFQ.js +0 -2
  32. package/src/components/AgeVerification/ageVerificationModal.js +0 -163
  33. package/src/components/AgeVerification/sellerCoupon.js +0 -119
  34. package/src/components/AgeVerification/sellerCouponCheckout.js +0 -164
  35. /package/src/components/{AgeVerification → AgeVerificationModal}/ageVerificationModal.shimmer.js +0 -0
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@riosst100/pwa-marketplace",
3
3
  "author": "riosst100@gmail.com",
4
- "version": "3.3.0",
4
+ "version": "3.3.2",
5
5
  "main": "src/index.js",
6
6
  "pwa-studio": {
7
7
  "targets": {
@@ -0,0 +1,111 @@
1
+ .root {
2
+ /* Theme color variables mapped from tcg-theme-preset.js */
3
+ --tcg-color-text: #1B1B1B; /* textColor.colorDefault */
4
+ --tcg-color-link: #3d84ff; /* brand.base */
5
+ --tcg-color-link-hover: #f76b1c; /* brand.dark */
6
+ --tcg-color-border: #E6E9EA; /* gray.100 */
7
+ --tcg-color-table-head-bg: #F8F8F8; /* gray.50 */
8
+ --tcg-color-muted: #999999; /* gray.200 */
9
+
10
+ max-width: 1300px;
11
+ margin: 0 auto;
12
+ padding: 0 1rem;
13
+ color: var(--tcg-color-text);
14
+ }
15
+ @media (min-width: 768px) {
16
+ .root { padding: 0; }
17
+ }
18
+
19
+ /* Ensure CMS-injected wrapper classes are styled */
20
+ :global(.row-content){
21
+ max-width: 1300px;
22
+ width: 100%;
23
+ margin: 0 auto;
24
+ }
25
+
26
+ .root h1,
27
+ .root h2,
28
+ .root h3 {
29
+ margin: 1.25rem 0 0.75rem;
30
+ font-weight: 600;
31
+ }
32
+
33
+ .root p {
34
+ margin: 0.75rem 0;
35
+ line-height: 1.7;
36
+ color: var(--tcg-color-text);
37
+ }
38
+
39
+ .root ul,
40
+ .root ol {
41
+ margin: 0.75rem 0 0.75rem 1.25rem;
42
+ padding-left: 1.25rem;
43
+ }
44
+ .root ul { list-style: disc; }
45
+ .root ol { list-style: decimal; }
46
+ .root li { margin: 0.375rem 0; }
47
+
48
+ .root a {
49
+ color: var(--tcg-color-link);
50
+ text-decoration: underline;
51
+ text-underline-offset: 2px;
52
+ }
53
+ .root a:hover { color: var(--tcg-color-link-hover); }
54
+
55
+ .root img {
56
+ max-width: 100%;
57
+ height: auto;
58
+ }
59
+
60
+ /* Headings scale */
61
+ .root h1 {
62
+ text-align: center;
63
+ font-size: 1.5rem;
64
+ line-height: 1.3;
65
+ margin: 1.5rem 0 0.75rem;
66
+ }
67
+ @media (min-width: 768px) {
68
+ .root h1 { font-size: 1.75rem; }
69
+ }
70
+
71
+ .root h2 {
72
+ font-size: 1.125rem;
73
+ margin: 1.25rem 0 0.5rem;
74
+ }
75
+ @media (min-width: 768px) {
76
+ .root h2 { font-size: 1.25rem; }
77
+ }
78
+
79
+ .root h3 {
80
+ font-size: 1rem;
81
+ margin: 1rem 0 0.5rem;
82
+ }
83
+
84
+ .root hr {
85
+ border: 0;
86
+ border-top: 1px solid var(--tcg-color-border);
87
+ margin: 2rem 0;
88
+ }
89
+
90
+ .root table {
91
+ width: 100%;
92
+ border-collapse: collapse;
93
+ margin: 1rem 0;
94
+ }
95
+ .root th,
96
+ .root td {
97
+ border: 1px solid var(--tcg-color-border);
98
+ padding: 0.5rem 0.75rem;
99
+ text-align: left;
100
+ }
101
+ .root thead th {
102
+ background: var(--tcg-color-table-head-bg);
103
+ font-weight: 600;
104
+ }
105
+
106
+ .root blockquote {
107
+ border-left: 3px solid var(--tcg-color-border);
108
+ padding-left: 1rem;
109
+ color: var(--tcg-color-muted);
110
+ margin: 1rem 0;
111
+ }
@@ -1,9 +1,13 @@
1
1
  import React from 'react';
2
2
  import CMSPage from '@riosst100/pwa-marketplace/src/overwrites/venia-ui/lib/RootComponents/CMS/cms';
3
-
3
+ import classes from './aboutUs.css';
4
4
 
5
5
  const AboutUs = () => {
6
- return <CMSPage identifier="about-us" />
6
+ return (
7
+ <div className={classes.root}>
8
+ <CMSPage identifier="about-us" />
9
+ </div>
10
+ );
7
11
  }
8
12
 
9
13
  export default AboutUs;
@@ -0,0 +1,121 @@
1
+ import React, { useMemo, useState, useEffect, useCallback } from 'react';
2
+ import AgeVerificationModal from '@riosst100/pwa-marketplace/src/components/AgeVerificationModal';
3
+ import { useHistory, useLocation } from 'react-router-dom';
4
+ import { useToasts } from '@magento/peregrine/lib/Toasts';
5
+ import { BrowserPersistence } from '@magento/peregrine/lib/util';
6
+ import { useAgeVerification } from '@riosst100/pwa-marketplace/src/talons/AgeVerification/useAgeVerification'
7
+
8
+ const storage = new BrowserPersistence();
9
+
10
+ const AgeVerification = (props) => {
11
+ const { pageType, product } = props;
12
+
13
+ const [modalOpen, setModalOpen] = useState(false);
14
+
15
+ const [month, setMonth] = useState("");
16
+ const [day, setDay] = useState("");
17
+ const [year, setYear] = useState("");
18
+ const [ageVerificationErrorMessage, setAgeVerificationErrorMessage] = useState("");
19
+
20
+ const history = useHistory();
21
+ const location = useLocation();
22
+
23
+ const [, { addToast }] = useToasts();
24
+
25
+ const handleClose = () => setModalOpen(false);
26
+
27
+ const {
28
+ error,
29
+ loading,
30
+ ageVerificationConfig
31
+ } = useAgeVerification({ pageType, product });
32
+
33
+ const months = [
34
+ "January","February","March","April","May","June",
35
+ "July","August","September","October","November","December"
36
+ ];
37
+
38
+ const savedAge = storage.getItem('age');
39
+
40
+ useEffect(() => {
41
+ if (ageVerificationConfig && ageVerificationConfig.status) {
42
+ if (savedAge && savedAge > 18) {
43
+ setModalOpen(false);
44
+ } else {
45
+ setModalOpen(true);
46
+ }
47
+ }
48
+ }, [loading, setModalOpen, savedAge, ageVerificationConfig]);
49
+
50
+ const redirectUser = () => {
51
+ const currentPathname = location.pathname;
52
+ let historyPathname = history.location.pathname;
53
+ if (historyPathname == currentPathname) {
54
+ historyPathname = '/';
55
+ }
56
+
57
+ addToast({
58
+ type: 'error',
59
+ message: 'Access is restricted because you are under 18 years old.',
60
+ dismissable: true,
61
+ timeout: 5000
62
+ });
63
+
64
+ history.push(historyPathname)
65
+ };
66
+
67
+ const handleUnderAge = useCallback(() => {
68
+ redirectUser();
69
+ }, [])
70
+
71
+ const handleOverAge = useCallback(() => {
72
+ if (!day || !month || !year) {
73
+ setAgeVerificationErrorMessage('Please enter your birthday!');
74
+ return false;
75
+ }
76
+
77
+ const birthDate = new Date(
78
+ year,
79
+ months.indexOf(month),
80
+ day
81
+ );
82
+ const today = new Date();
83
+ const age = today.getFullYear() - birthDate.getFullYear();
84
+ const isBirthdayPassed =
85
+ today >= new Date(today.getFullYear(), birthDate.getMonth(), birthDate.getDate());
86
+
87
+ if (age > 18 || (age === 18 && isBirthdayPassed)) {
88
+ storage.setItem('age', age);
89
+
90
+ addToast({
91
+ type: 'success',
92
+ message: 'Thank you for confirming your age. Your birthday has been saved. You may now continue.',
93
+ dismissable: true,
94
+ timeout: 5000
95
+ });
96
+
97
+ handleClose();
98
+ return true;
99
+ }
100
+
101
+ redirectUser();
102
+ return;
103
+ }, [day, month, year])
104
+
105
+
106
+
107
+ return modalOpen ? (
108
+ <AgeVerificationModal
109
+ ageVerificationErrorMessage={ageVerificationErrorMessage}
110
+ modalOpen={modalOpen}
111
+ months={months}
112
+ setMonth={setMonth}
113
+ setDay={setDay}
114
+ setYear={setYear}
115
+ handleOverAge={handleOverAge}
116
+ handleUnderAge={handleUnderAge}
117
+ />
118
+ ) : ''
119
+ };
120
+
121
+ export default AgeVerification;
@@ -1,2 +1 @@
1
- export { default } from './ageVerificationModal';
2
- // export { default as AgeVerificationModalShimmer } from './ageVerificationModal.shimmer';
1
+ export { default } from './ageVerification';
@@ -0,0 +1,83 @@
1
+ import React from 'react';
2
+ import ReactDOM from 'react-dom';
3
+ import modalClasses from './ageVerificationModal.module.css';
4
+ import Icon from '@magento/venia-ui/lib/components/Icon';
5
+ import { AlertTriangle } from 'react-feather';
6
+
7
+
8
+ // Simple portal root fallback
9
+ const getPortalRoot = () => {
10
+ let root = document.getElementById('age-verification-portal');
11
+ if (!root) {
12
+ root = document.createElement('div');
13
+ root.id = 'age-verification-portal';
14
+ document.body.appendChild(root);
15
+ }
16
+ return root;
17
+ };
18
+
19
+ const AgeVerificationModal = props => {
20
+
21
+ const {
22
+ setMonth,
23
+ setDay,
24
+ setYear,
25
+ handleOverAge,
26
+ handleUnderAge,
27
+ ageVerificationErrorMessage,
28
+ modalOpen,
29
+ months
30
+ } = props;
31
+
32
+ const currentYear = new Date().getFullYear();
33
+ const years = Array.from({ length: 100 }, (_, i) => currentYear - i);
34
+ const days = Array.from({ length: 31 }, (_, i) => i + 1);
35
+
36
+ const modal = modalOpen ? (
37
+ <div className={modalClasses.overlay} role="dialog" aria-modal="true" aria-label="Modal">
38
+ <div className={modalClasses.backdrop} />
39
+ <div className={modalClasses.dialog}>
40
+ <div className={modalClasses.body}>
41
+ <div><Icon src={AlertTriangle} attrs={{ width: 20 }} /></div>
42
+ <h2 className={modalClasses.title}>Are you over 18 years old?</h2>
43
+ <p>You must be at least 18 years old to access this page. Please verify your age.</p>
44
+ <label>Your Birthday</label>
45
+ <div className={modalClasses.birthday}>
46
+ {/* Month */}
47
+ <select onChange={(e) => setMonth(e.target.value)}>
48
+ <option value="">Month</option>
49
+ {months.map((m) => (
50
+ <option key={m} value={m}>{m}</option>
51
+ ))}
52
+ </select>
53
+
54
+ {/* Day */}
55
+ <select onChange={(e) => setDay(e.target.value)}>
56
+ <option value="">Day</option>
57
+ {days.map((d) => (
58
+ <option key={d} value={d}>{d}</option>
59
+ ))}
60
+ </select>
61
+
62
+ {/* Year */}
63
+ <select onChange={(e) => setYear(e.target.value)}>
64
+ <option value="">Year</option>
65
+ {years.map((y) => (
66
+ <option key={y} value={y}>{y}</option>
67
+ ))}
68
+ </select>
69
+ </div>
70
+ {ageVerificationErrorMessage && <div>{ageVerificationErrorMessage}</div>}
71
+ <div className={modalClasses.actions}>
72
+ <button className={modalClasses.btnUnder} onClick={handleUnderAge}>I'm under 18 years old</button>
73
+ <button className={modalClasses.btnOver} onClick={handleOverAge}>I'm 18 years old</button>
74
+ </div>
75
+ </div>
76
+ </div>
77
+ </div>
78
+ ) : null;
79
+
80
+ return <>{modalOpen ? ReactDOM.createPortal(modal, getPortalRoot()) : null}</>;
81
+ };
82
+
83
+ export default AgeVerificationModal;
@@ -1,26 +1,89 @@
1
+ .modal label {
2
+ display: block;
3
+ font-size: 14px;
4
+ font-weight: bold;
5
+ margin-bottom: 8px;
6
+ text-align: left;
7
+ }
8
+
9
+ /* Birthday selects */
10
+ .birthday {
11
+ display: flex;
12
+ gap: 10px;
13
+ margin-bottom: 20px;
14
+ }
15
+
16
+ .birthday select {
17
+ flex: 1;
18
+ padding: 8px;
19
+ border-radius: 6px;
20
+ border: 1px solid #ccc;
21
+ }
22
+
23
+ /* Buttons */
24
+ .actions {
25
+ display: flex;
26
+ gap: 10px;
27
+ }
28
+
29
+ .btnUnder {
30
+ flex: 1;
31
+ padding: 10px;
32
+ border: none;
33
+ border-radius: 6px;
34
+ color: white;
35
+ font-size: 14px;
36
+ cursor: pointer;
37
+ }
38
+
39
+ .btnOver {
40
+ flex: 1;
41
+ padding: 10px;
42
+ border: none;
43
+ border-radius: 6px;
44
+ color: white;
45
+ font-size: 14px;
46
+ cursor: pointer;
47
+ }
48
+
49
+ .btnUnder {
50
+ background: #ef4444;
51
+ }
52
+
53
+ .btnOver {
54
+ background: #22c55e;
55
+ }
56
+
57
+ .btnOver:hover {
58
+ opacity: 0.9;
59
+ }
60
+
61
+ .btnUnder:hover {
62
+ opacity: 0.9;
63
+ }
64
+
1
65
  .overlay{
2
66
  position:fixed;
3
67
  inset:0;
4
- z-index:1000;
5
68
  display:flex;
6
- align-items:flex-start;
7
- justify-content:center;
8
69
  padding:5vh 24px;
9
- font-family:inherit
70
+ font-family:inherit;
71
+ align-items: center;
72
+ justify-content: center;
73
+ z-index: 9999;
10
74
  }
11
75
  .backdrop{
12
76
  position:absolute;
13
77
  inset:0;
14
- background:rgba(0,0,0,.4);
15
- backdrop-filter:blur(2px)
78
+ background: rgba(0, 0, 0, 0.64);
79
+ backdrop-filter: blur(8px);
16
80
  }
17
81
  .dialog{
18
82
  position:relative;
19
83
  background:#fff;
20
84
  border-radius:12px;
21
85
  box-shadow:0 8px 32px rgba(0,0,0,.25);
22
- width:clamp(320px,80vw,370px);
23
- max-height:90vh;
86
+ width:clamp(320px,80vw,500px);
24
87
  display:flex;
25
88
  flex-direction:column
26
89
  }
@@ -52,8 +115,12 @@
52
115
  color:#222
53
116
  }
54
117
  .body{
55
- padding:16px 20px;
56
- overflow:auto
118
+ padding: 20px 50px;
119
+ overflow: auto;
120
+ display: flex;
121
+ flex-direction: column;
122
+ text-align: center;
123
+ flex-wrap: wrap;
57
124
  }
58
125
  .triggerBtn{
59
126
  background:#f76b1c;
@@ -0,0 +1,2 @@
1
+ export { default } from './ageVerificationModal';
2
+ // export { default as AgeVerificationModalShimmer } from './ageVerificationModal.shimmer';
@@ -20,7 +20,6 @@ const Messages = props => {
20
20
  onSend,
21
21
  loading } = props;
22
22
  const classes = useStyle(defaultClasses, props.classes);
23
- // const { becomeSellerProps } = useMessages(props);
24
23
  const { formatMessage } = useIntl();
25
24
 
26
25
  const [selectedThread, setSelectedThread] = useState(null);
@@ -69,20 +68,11 @@ const Messages = props => {
69
68
  const { location } = globalThis;
70
69
 
71
70
  const query = new URLSearchParams(location.search);
72
-
73
-
74
- // console.log('query',query)
75
- // console.log('messageId',messageId)
76
71
 
77
72
  useEffect(() => {
78
73
  const messageId = query.get('id') || null;
79
- console.log('query',query)
80
- console.log('messageId',messageId)
81
-
82
74
  if (messageId && sortedThreads?.length) {
83
75
  const selectedThread = sortedThreads.find(t => t.message_id == messageId);
84
- console.log('sortedThreads',sortedThreads)
85
- console.log('selectedThread',selectedThread)
86
76
  if (selectedThread) {
87
77
  console.log('selectedThread',selectedThread)
88
78
  setSelectedThread(selectedThread);
@@ -0,0 +1 @@
1
+ export {default} from './privacyPolicy';
@@ -0,0 +1,125 @@
1
+ .root {
2
+ /* Theme color variables mapped from tcg-theme-preset.js */
3
+ --tcg-color-text: #1B1B1B; /* textColor.colorDefault */
4
+ --tcg-color-link: #3d84ff; /* brand.base */
5
+ --tcg-color-link-hover: #f76b1c; /* brand.dark */
6
+ --tcg-color-border: #E6E9EA; /* gray.100 */
7
+ --tcg-color-table-head-bg: #F8F8F8; /* gray.50 */
8
+ --tcg-color-muted: #999999; /* gray.200 */
9
+
10
+ max-width: 1300px;
11
+ margin: 0 auto;
12
+ padding: 0 1rem;
13
+ color: var(--tcg-color-text);
14
+ }
15
+ :global(.row-content){
16
+ max-width: 1300px;
17
+ width: 100%;
18
+ margin: 0 auto;
19
+ }
20
+ @media (min-width: 768px) {
21
+ .root { padding: 0; }
22
+ }
23
+
24
+ .root h1,
25
+ .root h2,
26
+ .root h3 {
27
+ margin: 1.25rem 0 0.75rem;
28
+ font-weight: 600;
29
+ }
30
+
31
+ .root p {
32
+ margin: 0.75rem 0;
33
+ line-height: 1.7;
34
+ }
35
+
36
+ .root ul,
37
+ .root ol {
38
+ margin: 0.75rem 0 0.75rem 1.25rem;
39
+ }
40
+
41
+ .root a {
42
+ color: var(--tcg-color-link);
43
+ text-decoration: underline;
44
+ }
45
+ .root a:hover {
46
+ color: var(--tcg-color-link-hover);
47
+ }
48
+
49
+ .root img {
50
+ max-width: 100%;
51
+ height: auto;
52
+ }
53
+
54
+ /* Enhanced typography & layout for CMS content */
55
+ .root > :first-child { margin-top: 0; }
56
+ .root > :last-child { margin-bottom: 0; }
57
+
58
+ .root h1 {
59
+ text-align: center;
60
+ font-size: 1.5rem;
61
+ line-height: 1.3;
62
+ margin: 1.5rem 0 0.75rem;
63
+ }
64
+ @media (min-width: 768px) {
65
+ .root h1 { font-size: 1.75rem; }
66
+ }
67
+
68
+ .root h2 {
69
+ font-size: 1.125rem;
70
+ margin: 1.25rem 0 0.5rem;
71
+ }
72
+ @media (min-width: 768px) {
73
+ .root h2 { font-size: 1.25rem; }
74
+ }
75
+
76
+ .root h3 {
77
+ font-size: 1rem;
78
+ margin: 1rem 0 0.5rem;
79
+ }
80
+
81
+ .root p {
82
+ color: var(--tcg-color-text);
83
+ line-height: 1.8;
84
+ }
85
+
86
+ .root ul,
87
+ .root ol {
88
+ padding-left: 1.25rem;
89
+ }
90
+ .root ul { list-style: disc; }
91
+ .root ol { list-style: decimal; }
92
+ .root li { margin: 0.375rem 0; }
93
+
94
+ .root a {
95
+ text-underline-offset: 2px;
96
+ }
97
+
98
+ .root hr {
99
+ border: 0;
100
+ border-top: 1px solid var(--tcg-color-border);
101
+ margin: 2rem 0;
102
+ }
103
+
104
+ .root table {
105
+ width: 100%;
106
+ border-collapse: collapse;
107
+ margin: 1rem 0;
108
+ }
109
+ .root th,
110
+ .root td {
111
+ border: 1px solid var(--tcg-color-border);
112
+ padding: 0.5rem 0.75rem;
113
+ text-align: left;
114
+ }
115
+ .root thead th {
116
+ background: var(--tcg-color-table-head-bg);
117
+ font-weight: 600;
118
+ }
119
+
120
+ .root blockquote {
121
+ border-left: 3px solid var(--tcg-color-border);
122
+ padding-left: 1rem;
123
+ color: var(--tcg-color-muted);
124
+ margin: 1rem 0;
125
+ }
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ import CMSPage from '@riosst100/pwa-marketplace/src/overwrites/venia-ui/lib/RootComponents/CMS/cms';
3
+ import classes from './privacyPolicy.css';
4
+
5
+ const PrivacyPolicy = () => {
6
+ return (
7
+ <div className={classes.root}>
8
+ <CMSPage identifier="privacy-policy" />
9
+ </div>
10
+ );
11
+ }
12
+
13
+ export default PrivacyPolicy;
@@ -26,12 +26,11 @@ const quoteDetail = () => {
26
26
  const { fetchCartId, addToCartResponseData, isAddProductLoading, errorAddingProductToCart, loadRfqDetail, rfqDetailState, handleSendRfqMessage, startDetailPolling, stopDetailPolling, handleConvertQuickrfqToCart } = useRFQ();
27
27
 
28
28
  const apolloClient = useApolloClient();
29
- const [{ createCart, removeCart }] = useCartContext();
29
+ const [{ cartId }, { createCart, removeCart }] = useCartContext();
30
30
 
31
31
  useEffect(async() => {
32
32
  if (
33
33
  addToCartResponseData
34
- && !addToCartResponseData?.addProductsToCart?.user_errors.length
35
34
  && !isAddProductLoading
36
35
  && !errorAddingProductToCart
37
36
  ) {
@@ -369,7 +368,7 @@ const quoteDetail = () => {
369
368
  classes={{
370
369
  content: 'capitalize text-[16px] font-medium'
371
370
  }}
372
- disabled={isConverting || !quickrfqIdValue || isNaN(quickrfqIdValue) || status === 'Done'}
371
+ // disabled={isConverting || !quickrfqIdValue || isNaN(quickrfqIdValue) || status === 'Done'}
373
372
  aria-busy={isConverting}
374
373
  onClick={handleConvertQuickrfqToCart}
375
374
  >
@@ -82,25 +82,28 @@ const ShowMore = props => {
82
82
  if (shopby == 'sc_brands') {
83
83
  additionalFilter = '&shopby=release&active_tab=brand';
84
84
  }
85
-
85
+
86
86
  const setRelases = newAvailableGroups && newAvailableGroups.length && newAvailableGroups.map((group, index) => {
87
87
  const optionsResult = [];
88
88
 
89
89
  if (active === 'all' || active === group) {
90
90
  dataResult[group] && dataResult[group].length && dataResult[group].map((option, index) => {
91
91
  const { count, label, value } = option;
92
+
93
+ const attrCodeParam = attributeData.attribute_code + '[filter]';
94
+ const attrValParam = label + ',' + value;
92
95
 
93
- const filter = attributeData.attribute_code + '[filter]=' + label + ',' + value;
94
- const params = filterSearch ? filterSearch + '&' + filter + additionalFilter : '?' + filter + additionalFilter;
96
+ const params = new URLSearchParams();
97
+ params.set(attrCodeParam, attrValParam);
95
98
 
96
99
  const categoryUrl = resourceUrl(
97
- `/${category?.url_path}${categoryUrlSuffix || ''}${params}`
100
+ `/${category?.url_path}${categoryUrlSuffix || ''}${'?' + params.toString()}`
98
101
  );
99
102
 
100
103
  optionsResult.push(<li key={index} className='list-none'>
101
104
  <Link to={categoryUrl} className="hover_bg-darkblue-900 hover_text-white w-full block text-[14px] py-[2px] px-0">
102
105
  {label}
103
- {/* <span className='text-[12px]'>({count})</span> */}
106
+ {/* <span className='text-[12px]'>({count})</span> */}
104
107
  </Link>
105
108
  </li>)
106
109
  });
@@ -0,0 +1 @@
1
+ export {default} from './termsOfUse';