@riosst100/pwa-marketplace 3.0.0 → 3.0.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.
Files changed (50) hide show
  1. package/i18n/en_US.json +1 -1
  2. package/i18n/id_ID.json +1 -1
  3. package/package.json +1 -1
  4. package/src/componentOverrideMapping.js +1 -0
  5. package/src/components/CheckoutHeader/checkoutHeader.js +162 -0
  6. package/src/components/CheckoutHeader/checkoutHeader.module.css +171 -0
  7. package/src/components/CheckoutHeader/index.js +1 -0
  8. package/src/components/FavoriteSeller/AddToListButton/addToListButton.module.css +2 -2
  9. package/src/components/FilterTop/FilterBlockList/filterTopItem.module.css +2 -0
  10. package/src/components/SellerCoupon/index.js +1 -0
  11. package/src/components/SellerCoupon/sellerCoupon.js +84 -0
  12. package/src/components/SellerCoupon/sellerCoupon.module.css +110 -0
  13. package/src/components/SellerCoupon/sellerCouponCheckout.js +147 -0
  14. package/src/components/SellerCoupon/sellerCouponCheckout.module.css +85 -0
  15. package/src/components/SellerDetail/sellerDetail.js +10 -2
  16. package/src/components/SellerProducts/sellerProducts.js +4 -2
  17. package/src/overwrites/peregrine/lib/talons/CartPage/PriceSummary/usePriceSummary.js +10 -1
  18. package/src/overwrites/peregrine/lib/talons/CheckoutPage/checkoutPage.extended.gql.js +17 -1
  19. package/src/overwrites/peregrine/lib/talons/Header/useCartTrigger.js +82 -0
  20. package/src/overwrites/peregrine/lib/talons/ProductFullDetail/useProductFullDetail.js +17 -1
  21. package/src/overwrites/venia-ui/lib/components/Breadcrumbs/breadcrumbs.js +11 -11
  22. package/src/overwrites/venia-ui/lib/components/CartPage/PriceSummary/priceSummary.js +24 -6
  23. package/src/overwrites/venia-ui/lib/components/CartPage/ProductListing/productListing.js +6 -2
  24. package/src/overwrites/venia-ui/lib/components/CartPage/ProductListingBySeller/productListingBySeller.js +3 -1
  25. package/src/overwrites/venia-ui/lib/components/CartPage/cartPage.js +20 -4
  26. package/src/overwrites/venia-ui/lib/components/CheckoutPage/OrderSummary/orderSummary.js +1 -1
  27. package/src/overwrites/venia-ui/lib/components/CheckoutPage/PaymentInformation/paymentInformation.js +1 -1
  28. package/src/overwrites/venia-ui/lib/components/CheckoutPage/PaymentInformation/paymentMethods.js +1 -1
  29. package/src/overwrites/venia-ui/lib/components/CheckoutPage/PriceAdjustments/priceAdjustments.js +74 -6
  30. package/src/overwrites/venia-ui/lib/components/CheckoutPage/ShippingInformation/shippingInformation.js +3 -3
  31. package/src/overwrites/venia-ui/lib/components/CheckoutPage/checkoutPage.js +53 -2
  32. package/src/overwrites/venia-ui/lib/components/CheckoutPage/checkoutPage.module.css +1 -1
  33. package/src/overwrites/venia-ui/lib/components/FilterModal/FilterList/filterItemRadio.js +1 -2
  34. package/src/overwrites/venia-ui/lib/components/FilterModal/FilterList/filterItemRadioGroup.js +10 -27
  35. package/src/overwrites/venia-ui/lib/components/FilterModal/FilterList/subFilterItemRadioGroup.js +1 -1
  36. package/src/overwrites/venia-ui/lib/components/Footer/footer.js +14 -4
  37. package/src/overwrites/venia-ui/lib/components/Footer/footer.module.css +16 -4
  38. package/src/overwrites/venia-ui/lib/components/Gallery/item.js +9 -8
  39. package/src/overwrites/venia-ui/lib/components/Header/accountTrigger.js +3 -3
  40. package/src/overwrites/venia-ui/lib/components/Header/cartTrigger.js +9 -6
  41. package/src/overwrites/venia-ui/lib/components/Header/cartTrigger.module.css +1 -1
  42. package/src/overwrites/venia-ui/lib/components/Header/header.js +2 -0
  43. package/src/overwrites/venia-ui/lib/components/Header/wishlistTrigger.js +4 -4
  44. package/src/overwrites/venia-ui/lib/components/Main/main.js +9 -4
  45. package/src/overwrites/venia-ui/lib/components/Main/main.module.css +2 -2
  46. package/src/overwrites/venia-ui/lib/components/ProductFullDetail/productFullDetail.js +100 -72
  47. package/src/overwrites/venia-ui/lib/components/ToastContainer/toast.module.css +3 -3
  48. package/src/talons/Header/useCartTrigger.js +82 -0
  49. package/src/talons/Seller/seller.gql.js +42 -1
  50. package/src/talons/Seller/useSeller.js +25 -2
@@ -37,6 +37,8 @@ const ProductListingBySeller = props => {
37
37
  setIsCartUpdating,
38
38
  fetchCartDetails,
39
39
  activeEditItem,
40
+ setIsProceedToCheckout,
41
+ isProceedToCheckout,
40
42
  setActiveEditItem,
41
43
  wishlistConfig,
42
44
  isLoading,
@@ -80,7 +82,7 @@ const ProductListingBySeller = props => {
80
82
  ));
81
83
 
82
84
  const priceSummary = hasItems ? (
83
- <PriceSummary isUpdating={isCartUpdating} sellerUrl={seller.seller_url} />
85
+ <PriceSummary isProceedToCheckout={isProceedToCheckout} setIsProceedToCheckout={setIsProceedToCheckout} setIsCartUpdating={setIsCartUpdating} isUpdating={isCartUpdating} sellerUrl={seller.seller_url} />
84
86
  ) : null;
85
87
  return (
86
88
  <Fragment>
@@ -14,6 +14,7 @@ import PriceSummary from './PriceSummary';
14
14
  import ProductListing from './ProductListing';
15
15
  import defaultClasses from './cartPage.module.css';
16
16
  import cn from 'classnames';
17
+ import { useHistory } from 'react-router-dom';
17
18
 
18
19
  const CheckIcon = <Icon size={20} src={Check} />;
19
20
 
@@ -45,19 +46,31 @@ const CartPage = props => {
45
46
  onAddToWishlistSuccess,
46
47
  setIsCartUpdating,
47
48
  shouldShowLoadingIndicator,
48
- wishlistSuccessProps
49
+ isProceedToCheckout,
50
+ setIsProceedToCheckout,
51
+ wishlistSuccessProps,
52
+ isGuestCheckout
49
53
  } = talonProps;
50
-
54
+
51
55
  const classes = useStyle(defaultClasses, props.classes);
52
56
  const { formatMessage } = useIntl();
53
57
  const [, { addToast }] = useToasts();
54
58
 
59
+ const history = useHistory();
60
+
61
+ useEffect(() => {
62
+ if (isGuestCheckout) {
63
+ history.push('/sign-in');
64
+ }
65
+ }, [isGuestCheckout, history]);
66
+
55
67
  useEffect(() => {
56
68
  if (wishlistSuccessProps) {
57
69
  addToast({ ...wishlistSuccessProps, icon: CheckIcon });
58
70
  }
59
71
  }, [addToast, wishlistSuccessProps]);
60
72
 
73
+
61
74
  if (shouldShowLoadingIndicator) {
62
75
  return fullPageLoadingIndicator;
63
76
  }
@@ -70,7 +83,9 @@ const CartPage = props => {
70
83
  <ProductListing
71
84
  onAddToWishlistSuccess={onAddToWishlistSuccess}
72
85
  setIsCartUpdating={setIsCartUpdating}
86
+ isProceedToCheckout={isProceedToCheckout}
73
87
  fetchCartDetails={fetchCartDetails}
88
+ setIsProceedToCheckout={setIsProceedToCheckout}
74
89
  isCartUpdating={isCartUpdating}
75
90
  hasItems={hasItems}
76
91
  />
@@ -93,7 +108,7 @@ const CartPage = props => {
93
108
  <StoreTitle>
94
109
  {formatMessage({
95
110
  id: 'cartPage.title',
96
- defaultMessage: 'Cart'
111
+ defaultMessage: 'Shopping Cart'
97
112
  })}
98
113
  </StoreTitle>
99
114
  <div className={cn(classes.heading_container, 'mb-[30px]')}>
@@ -104,7 +119,7 @@ const CartPage = props => {
104
119
  >
105
120
  <FormattedMessage
106
121
  id={'cartPage.heading'}
107
- defaultMessage={'Cart'}
122
+ defaultMessage={'Shopping Cart'}
108
123
  />
109
124
  </h1>
110
125
  <div className={classes.stockStatusMessageContainer}>
@@ -127,3 +142,4 @@ const CartPage = props => {
127
142
  };
128
143
 
129
144
  export default CartPage;
145
+
@@ -12,7 +12,7 @@ const OrderSummary = props => {
12
12
  <h2 aria-live="polite" className="text-[16px] font-medium mb-4">
13
13
  <FormattedMessage
14
14
  id={'checkoutPage.orderSummary'}
15
- defaultMessage={'Summary'}
15
+ defaultMessage={'Order Summary'}
16
16
  />
17
17
  </h2>
18
18
  <PriceSummary isUpdating={props.isUpdating} />
@@ -49,7 +49,7 @@ const PaymentInformation = props => {
49
49
  <LoadingIndicator classes={{ root: classes.loading }}>
50
50
  <FormattedMessage
51
51
  id={'checkoutPage.loadingPaymentInformation'}
52
- defaultMessage={'Fetching Payment Information'}
52
+ defaultMessage={'Fetching Payment Method'}
53
53
  />
54
54
  </LoadingIndicator>
55
55
  );
@@ -180,7 +180,7 @@ const PaymentMethods = props => {
180
180
  <h5 className={classes.cardTitle}>
181
181
  {formatMessage({
182
182
  id: 'checkoutPage.paymentInformation',
183
- defaultMessage: 'Payment Information'
183
+ defaultMessage: 'Payment Method'
184
184
  })}
185
185
  </h5>
186
186
  <RadioGroup
@@ -1,11 +1,14 @@
1
- import React, { Suspense } from 'react';
1
+ import React, { Suspense, useCallback, useState } from 'react';
2
2
  import { useIntl } from 'react-intl';
3
3
  import { func } from 'prop-types';
4
+ import { useMutation, useQuery } from '@apollo/client';
5
+ import { useCartContext } from '@magento/peregrine/lib/context/cart';
4
6
 
5
7
  import { useStyle } from '@magento/venia-ui/lib/classify';
6
8
  import LoadingIndicator from '@magento/venia-ui/lib/components/LoadingIndicator';
7
9
  import { Accordion, Section } from '@magento/venia-ui/lib/components/Accordion';
8
- import CouponCode from '@magento/venia-ui/lib/components/CartPage/PriceAdjustments/CouponCode';
10
+ import SellerCouponCheckout from '@riosst100/pwa-marketplace/src/components/SellerCoupon/sellerCouponCheckout';
11
+ import couponCodeOperations from '@magento/peregrine/lib/talons/CartPage/PriceAdjustments/CouponCode/couponCode.gql';
9
12
  import GiftCardSection from '@magento/venia-ui/lib/components/CartPage/PriceAdjustments/giftCardSection';
10
13
  import GiftOptionsSection from '@magento/venia-ui/lib/components/CartPage/PriceAdjustments/giftOptionsSection';
11
14
 
@@ -20,8 +23,44 @@ import cn from 'classnames';
20
23
  const PriceAdjustments = props => {
21
24
  const classes = useStyle(defaultClasses, props.classes);
22
25
 
23
- const { setPageIsUpdating } = props;
26
+ const { setPageIsUpdating, couponData, couponLoading, couponError } = props;
24
27
  const { formatMessage } = useIntl();
28
+ const [{ cartId }] = useCartContext();
29
+ const [applyCoupon, { loading: applyingCoupon }] = useMutation(couponCodeOperations.applyCouponMutation);
30
+ const [removeCoupon, { loading: removingCoupon }] = useMutation(couponCodeOperations.removeCouponMutation);
31
+ const { data: appliedData, loading: appliedLoading } = useQuery(
32
+ couponCodeOperations.getAppliedCouponsQuery,
33
+ { variables: { cartId }, skip: !cartId }
34
+ );
35
+ const [sectionOpen, setSectionOpen] = useState(false);
36
+
37
+ const handleApplyFromClaim = useCallback(async (item) => {
38
+ if (!item?.code || !cartId) return;
39
+ try {
40
+ setPageIsUpdating(true);
41
+ await applyCoupon({
42
+ variables: { cartId, couponCode: item.code }
43
+ });
44
+ } catch (e) {
45
+ // silent; error surfaced by apollo links/toasts if configured
46
+ } finally {
47
+ setPageIsUpdating(false);
48
+ }
49
+ }, [applyCoupon, cartId, setPageIsUpdating]);
50
+
51
+ const handleRemoveCoupon = useCallback(async () => {
52
+ if (!cartId) return;
53
+ try {
54
+ setPageIsUpdating(true);
55
+ await removeCoupon({ variables: { cartId } });
56
+ } catch (e) {
57
+ // silent
58
+ } finally {
59
+ setPageIsUpdating(false);
60
+ }
61
+ }, [removeCoupon, cartId, setPageIsUpdating]);
62
+
63
+ const appliedCoupons = appliedData?.cart?.applied_coupons || [];
25
64
 
26
65
  return (
27
66
  <div className={classes.root}>
@@ -36,17 +75,46 @@ const PriceAdjustments = props => {
36
75
  id={'coupon_code'}
37
76
  title={formatMessage({
38
77
  id: 'checkoutPage.couponCode',
39
- defaultMessage: 'Enter Coupon Code'
78
+ defaultMessage: 'Apply Coupon Code'
40
79
  })}
41
80
  classes={{
42
81
  root: cn('border border-gray-100 rounded-md max-w-[400px] p-2.5'),
43
- title: 'text-[16px] font-medium',
82
+ title: 'text-[16px] font-medium cursor-pointer',
44
83
  title_wrapper: 'gap-sm grid grid-cols-1 grid-flow-col h-[38px] items-center justify-items-start',
45
84
  contents_container: 'p-0'
46
85
  }}
86
+ onClick={() => setSectionOpen(prev => !prev)}
47
87
  >
48
88
  <Suspense fallback={<LoadingIndicator />}>
49
- <CouponCode setIsCartUpdating={setPageIsUpdating} />
89
+ {sectionOpen && (
90
+ <SellerCouponCheckout
91
+ couponData={couponData}
92
+ couponLoading={couponLoading || applyingCoupon || appliedLoading || removingCoupon}
93
+ couponError={couponError}
94
+ autoOpen={true}
95
+ closeOnClaim={true}
96
+ onSelectCoupon={handleApplyFromClaim}
97
+ onTriggerRender={() => null}
98
+ />
99
+ )}
100
+ {appliedCoupons.length > 0 && (
101
+ <div className="mt-3 flex items-center gap-2 flex-wrap">
102
+ {appliedCoupons.map(c => (
103
+ <div key={c.code} className="flex items-center gap-2 bg-[#fff8f1] border border-[#ffb891] rounded px-2 py-1 text-sm font-medium text-[#f76b1c]">
104
+ <span>{c.code}</span>
105
+ <button
106
+ type="button"
107
+ onClick={handleRemoveCoupon}
108
+ disabled={removingCoupon}
109
+ className="text-[#a94442] hover:text-[#f26313] disabled:opacity-50"
110
+ aria-label={formatMessage({ id: 'checkoutPage.removeCoupon', defaultMessage: 'Remove coupon' })}
111
+ >
112
+ ×
113
+ </button>
114
+ </div>
115
+ ))}
116
+ </div>
117
+ )}
50
118
  </Suspense>
51
119
  </Section>
52
120
  <GiftCardSection setIsCartUpdating={setPageIsUpdating} />
@@ -50,7 +50,7 @@ const ShippingInformation = props => {
50
50
  <LoadingIndicator classes={{ root: classes.loading }}>
51
51
  <FormattedMessage
52
52
  id={'shippingInformation.loading'}
53
- defaultMessage={'Fetching Shipping Information...'}
53
+ defaultMessage={'Fetching Shipping Address...'}
54
54
  />
55
55
  </LoadingIndicator>
56
56
  );
@@ -68,7 +68,7 @@ const ShippingInformation = props => {
68
68
  <h5 className={classes.cardTitle}>
69
69
  <FormattedMessage
70
70
  id={'shippingInformation.cardTitle'}
71
- defaultMessage={'Shipping Information'}
71
+ defaultMessage={'Shipping Address'}
72
72
  />
73
73
  </h5>
74
74
  <LinkButton
@@ -100,7 +100,7 @@ const ShippingInformation = props => {
100
100
  >
101
101
  <FormattedMessage
102
102
  id={'shippingInformation.editTitle'}
103
- defaultMessage={'Shipping Information'}
103
+ defaultMessage={'Shipping Address'}
104
104
  />
105
105
  </h3>
106
106
  <div className={classes.editWrapper}>
@@ -1,4 +1,5 @@
1
- import React, { Fragment, useEffect } from 'react';
1
+ import React, { Fragment, useEffect, useMemo } from 'react';
2
+ import { useQuery } from '@apollo/client';
2
3
  import { shape, string } from 'prop-types';
3
4
  import { FormattedMessage, useIntl } from 'react-intl';
4
5
  import { AlertCircle as AlertCircleIcon } from 'react-feather';
@@ -28,9 +29,11 @@ import ShippingInformation from './ShippingInformation';
28
29
  import OrderConfirmationPage from './OrderConfirmationPage';
29
30
  import ItemsReview from './ItemsReview';
30
31
  import GoogleReCaptcha from '@magento/venia-ui/lib/components/GoogleReCaptcha';
32
+ import { GET_COUPON_CODE_QUERY } from '@riosst100/pwa-marketplace/src/talons/Seller/seller.gql';
31
33
 
32
34
  import defaultClasses from './checkoutPage.module.css';
33
35
  import ScrollAnchor from '@magento/venia-ui/lib/components/ScrollAnchor/scrollAnchor';
36
+ import { useHistory } from 'react-router-dom';
34
37
 
35
38
  const errorIcon = <Icon src={AlertCircleIcon} size={20} />;
36
39
 
@@ -84,6 +87,21 @@ const CheckoutPage = props => {
84
87
 
85
88
  const [, { addToast }] = useToasts();
86
89
 
90
+ const history = useHistory();
91
+
92
+
93
+ useEffect(() => {
94
+ if (isGuestCheckout) {
95
+ history.push('/sign-in');
96
+ }
97
+ }, [isGuestCheckout, history]);
98
+
99
+ useEffect(() => {
100
+ if (!isLoading && !isUpdating && !cartItems.length && isCartEmpty) {
101
+ history.push('/cart');
102
+ }
103
+ }, [isCartEmpty, isLoading, isUpdating, cartItems, history]);
104
+
87
105
  useEffect(() => {
88
106
  if (hasError) {
89
107
  const message =
@@ -115,6 +133,34 @@ const CheckoutPage = props => {
115
133
 
116
134
  let checkoutContent;
117
135
 
136
+ const sellerUrls = useMemo(() => {
137
+ if (!cartItems || !cartItems.length) return [];
138
+ const urls = cartItems
139
+ .map(item => item?.seller?.seller_url)
140
+ .filter(Boolean);
141
+ return Array.from(new Set(urls));
142
+ }, [cartItems]);
143
+
144
+ const sellerUrl = sellerUrls[0] || null;
145
+
146
+ const {
147
+ data: couponData,
148
+ loading: couponLoading,
149
+ error: couponError
150
+ } = useQuery(GET_COUPON_CODE_QUERY, {
151
+ variables: {
152
+ sellerUrl,
153
+ pageSize: 20,
154
+ currentPage: 1,
155
+ filters: {
156
+ is_public: { eq: '1' }
157
+ }
158
+ },
159
+ skip: !sellerUrl,
160
+ fetchPolicy: 'cache-and-network',
161
+ nextFetchPolicy: 'cache-first'
162
+ });
163
+
118
164
  const heading = isGuestCheckout
119
165
  ? formatMessage({
120
166
  id: 'checkoutPage.guestCheckout',
@@ -240,7 +286,12 @@ const CheckoutPage = props => {
240
286
  const priceAdjustmentsSection =
241
287
  checkoutStep === CHECKOUT_STEP.PAYMENT ? (
242
288
  <div className={classes.price_adjustments_container}>
243
- <PriceAdjustments setPageIsUpdating={setIsUpdating} />
289
+ <PriceAdjustments
290
+ setPageIsUpdating={setIsUpdating}
291
+ couponData={couponData}
292
+ couponLoading={couponLoading}
293
+ couponError={couponError}
294
+ />
244
295
  </div>
245
296
  ) : null;
246
297
 
@@ -2,7 +2,7 @@
2
2
  composes: mx-0 from global;
3
3
  composes: my-0 from global;
4
4
  composes: px-0 from global;
5
- composes: py-md from global;
5
+ /* composes: py-md from global; */
6
6
  }
7
7
 
8
8
  /* prettier-ignore */
@@ -44,7 +44,6 @@ const FilterItemRadio = props => {
44
44
  classes={classes}
45
45
  id={`item-${group}-${value}`}
46
46
  label={title}
47
- isSubFilter={isSubFilter}
48
47
  value={value}
49
48
  onChange={handleOnchange}
50
49
  data-cy="FilterDefault-radio"
@@ -74,7 +73,7 @@ FilterItemRadio.propTypes = {
74
73
  path: string
75
74
  }).isRequired,
76
75
  onApply: func,
77
- labels: instanceOf(Map).isRequired
76
+ labels: instanceOf(WeakMap).isRequired
78
77
  };
79
78
 
80
79
  export default FilterItemRadio;
@@ -45,32 +45,15 @@ const FilterItemRadioGroup = props => {
45
45
  // }
46
46
 
47
47
  return (
48
- <>
49
- <FilterItemRadio
50
- key={code}
51
- filterApi={filterApi}
52
- filterState={filterState}
53
- group={group}
54
- item={item}
55
- onApply={onApply}
56
- labels={labels}
57
- />
58
- {/* {subFilter && <FilterBlock
59
- key={subFilter.key}
60
- filterApi={subFilter.filterApi}
61
- filterState={subFilter.filterState}
62
- filterFrontendInput={subFilter.filterFrontendInput}
63
- group={subFilter.group}
64
- allowedSubFilters={newAllowedSubFilters}
65
- subFilterItems={subFilterItems}
66
- isSubFilter={true}
67
- items={subFilter.items}
68
- name={''}
69
- onApply={subFilter.onApply}
70
- initialOpen={true}
71
- />} */}
72
- {/* {subFilterBlock} */}
73
- </>
48
+ <FilterItemRadio
49
+ key={index}
50
+ filterApi={filterApi}
51
+ filterState={filterState}
52
+ group={group}
53
+ item={item}
54
+ onApply={onApply}
55
+ labels={labels}
56
+ />
74
57
  );
75
58
  });
76
59
  }, [filterApi, allowedSubFilters, subFilter, filterState, group, items, labels, onApply,isListExpanded,itemCountToShow]);
@@ -122,7 +105,7 @@ FilterItemRadioGroup.propTypes = {
122
105
  })
123
106
  ).isRequired,
124
107
  onApply: func,
125
- labels: instanceOf(Map).isRequired
108
+ labels: instanceOf(WeakMap).isRequired
126
109
  };
127
110
 
128
111
  export default FilterItemRadioGroup;
@@ -85,7 +85,7 @@ SubFilterItemRadioGroup.propTypes = {
85
85
  })
86
86
  ).isRequired,
87
87
  onApply: func,
88
- labels: instanceOf(Map).isRequired
88
+ labels: instanceOf(WeakMap).isRequired
89
89
  };
90
90
 
91
91
  export default SubFilterItemRadioGroup;
@@ -4,6 +4,7 @@ import { FormattedMessage, useIntl } from 'react-intl';
4
4
  import { Link } from 'react-router-dom';
5
5
  import { shape, string } from 'prop-types';
6
6
  import { useFooter } from '@magento/peregrine/lib/talons/Footer/useFooter';
7
+ import { useLocation } from 'react-router-dom';
7
8
 
8
9
  import Logo from '@magento/venia-ui/lib/components/Logo';
9
10
  import Newsletter from '@magento/venia-ui/lib/components/Newsletter';
@@ -19,6 +20,9 @@ const Footer = props => {
19
20
  const classes = useStyle(defaultClasses, props.classes);
20
21
  const talonProps = useFooter();
21
22
 
23
+ const location = useLocation();
24
+ const isCheckoutPage = location.pathname === '/checkout';
25
+
22
26
  const { copyrightText } = talonProps;
23
27
  const { formatMessage } = useIntl();
24
28
  const title = formatMessage({ id: 'logo.title', defaultMessage: 'Venia' });
@@ -62,10 +66,16 @@ const Footer = props => {
62
66
  data-cy="Footer-root"
63
67
  className={cn(
64
68
  classes.root,
65
- '!pt-[50px] !px-6 lg_!px-4'
69
+ // '!pt-[50px] !px-6 lg_!px-4'
66
70
  )}
71
+ style={
72
+ {
73
+ "zIndex": 1,
74
+ "position": "relative"
75
+ }
76
+ }
67
77
  >
68
- <div className={classes.links}>
78
+ {!isCheckoutPage && <div className={classes.links}>
69
79
  {linkGroups}
70
80
  <div>
71
81
  <Newsletter />
@@ -107,8 +117,8 @@ const Footer = props => {
107
117
  </li>
108
118
  </ul>
109
119
  </div>
110
- </div>
111
- <div className="flex flex-row justify-between py-2 border-t border-gray-100">
120
+ </div>}
121
+ <div className={"flex flex-row justify-between py-4 border-t border-gray-100 w-full py-[15px] mx-[auto] flex justify-between items-center" + (isCheckoutPage ? " max-w-[1000px]" : " max-w-[1300px]")}>
112
122
  <p className="text-colorDefault">{copyrightText || null}</p>
113
123
  <ul className="flex flex-row gap-x-2.5">
114
124
  <li data-cy="Footer-terms" className={classes.terms}>
@@ -2,14 +2,14 @@
2
2
  composes: border-t from global;
3
3
  composes: border-solid from global;
4
4
  composes: border-gray-100 from global;
5
- composes: gap-y-16 from global;
5
+ composes: gap-y-0 from global;
6
6
  composes: grid from global;
7
7
  composes: leading-normal from global;
8
- composes: max-w-site from global;
9
- composes: min-h-[15rem] from global;
8
+ /* composes: max-w-site from global; */
9
+ /* composes: min-h-[15rem] from global; */
10
10
  composes: mx-auto from global;
11
11
  composes: my-0 from global;
12
- composes: pt-16 from global;
12
+ /* composes: pt-16 from global; */
13
13
  composes: text-sm from global;
14
14
  composes: text-subtle from global;
15
15
  composes: w-full from global;
@@ -19,12 +19,24 @@
19
19
  composes: gap-x-md from global;
20
20
  composes: gap-y-lg from global;
21
21
  composes: grid from global;
22
+ composes: py-6 from global;
22
23
  composes: grid-cols-1 from global;
23
24
  composes: md_grid-cols-1 from global;
24
25
  composes: grid-flow-row-dense from global;
25
26
  composes: lg_gap-x-sm from global;
26
27
  composes: lg_gap-y-md from global;
27
28
  composes: lg_grid-cols-4 from global;
29
+ composes: flex from global;
30
+ composes: flex-row from global;
31
+ composes: justify-between from global;
32
+ composes: w-full from global;
33
+ composes: w-full from global;
34
+ composes: mx-[auto] from global;
35
+ composes: max-w-[1300px] from global;
36
+ /* composes: py-[10px] from global; */
37
+ /* composes: px-[15px] from global; */
38
+
39
+ /* border-t border-gray-100 px-[15px] py-[10px] mx-[auto] */
28
40
  }
29
41
 
30
42
  .linkGroup {
@@ -108,10 +108,10 @@ const GalleryItem = props => {
108
108
  >
109
109
  <div className={cn('item-product relative z-[1]')}>
110
110
  <ProductLabel item={item} />
111
- <Link
111
+ <span
112
112
  aria-label={name}
113
- onClick={handleLinkClick}
114
- to={productLink}
113
+ // onClick={handleLinkClick}
114
+ // to={productLink}
115
115
  className={classes.images}
116
116
  >
117
117
  <Image
@@ -127,17 +127,18 @@ const GalleryItem = props => {
127
127
  widths={IMAGE_WIDTHS}
128
128
  />
129
129
  {ratingAverage}
130
- </Link>
130
+ </span>
131
131
  </div>
132
132
  <div className={cn('item-info px-[15px] pb-[20px]')}>
133
- <Link
133
+ {/* <Link
134
134
  onClick={handleLinkClick}
135
135
  to={productLink}
136
136
  className={cn(classes.name, 'xs_!no-underline')}
137
137
  data-cy="GalleryItem-name"
138
- >
139
- <span>{name}</span>
140
- </Link>
138
+ > */}
139
+ <span className={cn(classes.name, 'xs_!no-underline')}
140
+ data-cy="GalleryItem-name">{name}</span>
141
+ {/* </Link> */}
141
142
  <div data-cy="GalleryItem-price" className={cn(classes.price, 'mb-2.5 pt-2.5')}>
142
143
  <p className='font-medium !text-[#f76b1c] text-[1.1rem] !mb-1 !leading-[14px]'>
143
144
  <Price
@@ -4,9 +4,9 @@ import { shape, string } from 'prop-types';
4
4
 
5
5
  import { useAccountTrigger } from '@magento/peregrine/lib/talons/Header/useAccountTrigger';
6
6
  import { useStyle } from '@magento/venia-ui/lib/classify';
7
-
7
+ import Icon from '@magento/venia-ui/lib/components/Icon';
8
8
  // import AccountChip from '../AccountChip';
9
- import { User } from 'iconsax-react';
9
+ import { User as UserIcon } from 'react-feather';
10
10
  import { darkBlue } from '@riosst100/pwa-marketplace/src/theme/vars';
11
11
  import cn from 'classnames';
12
12
 
@@ -67,7 +67,7 @@ const AccountTrigger = props => {
67
67
  })}
68
68
  shouldIndicateLoading={true}
69
69
  /> */}
70
- <User size="20" color={darkBlue} className={cn('stroke-0')} variant="Outline" />
70
+ <Icon src={UserIcon} attrs={{ width: 20 }} />
71
71
  {isUserSignedIn ? <span className='text-base font-medium'>
72
72
  {formatMessage({
73
73
  id: 'accountTrigger.myAccount',
@@ -10,7 +10,7 @@ import Icon from '@magento/venia-ui/lib/components/Icon';
10
10
  import defaultClasses from './cartTrigger.module.css';
11
11
  import { GET_ITEM_COUNT_QUERY } from '@magento/venia-ui/lib/components/Header/cartTrigger.gql';
12
12
  import cn from 'classnames';
13
- import { ShoppingCart } from 'iconsax-react';
13
+ import { ShoppingCart } from 'react-feather';
14
14
  import { darkBlue } from '@riosst100/pwa-marketplace/src/theme/vars';
15
15
  import { Link } from 'react-router-dom';
16
16
 
@@ -49,8 +49,8 @@ const CartTrigger = props => {
49
49
  <span
50
50
  className={cn(
51
51
  classes.counter,
52
- 'bg-yellow-300 min-w-[18px] min-h-[18px] text-base font-regular leading-[18px] top-[-2px]',
53
- '!left-auto right-[3px]'
52
+ 'bg-[#f76b1c] min-w-[18px] min-h-[18px] text-[10px] font-regular leading-[18px] top-[-5px]',
53
+ '!left-auto right-[-4px] absolute p-0 bg'
54
54
  )}
55
55
  data-cy="CartTrigger-counter"
56
56
  >
@@ -58,6 +58,8 @@ const CartTrigger = props => {
58
58
  </span>
59
59
  ) : null;
60
60
 
61
+ // const ShoppingCartIcon = <Icon src={ShoppingCart} attrs={{ width: 20 }} />;
62
+
61
63
  const cartTrigger = hideCartTrigger ? null : (
62
64
  // Because this button behaves differently on desktop and mobile
63
65
  // we render two buttons that differ only in their click handler
@@ -67,13 +69,14 @@ const CartTrigger = props => {
67
69
  <Link
68
70
  className={cn(
69
71
  classes.trigger,
70
- 'gap-[5px] !min-h-[30px] !h-auto !min-w-[35px] !w-fit !justify-between',
72
+ 'gap-[5px] !min-h-[30px] !h-auto !min-w-[35px] !w-fit',
71
73
  )}
72
74
  to='/cart'
73
75
  >
74
76
  <span>
75
77
  {/* <Icon src={ShoppingCartIcon} /> */}
76
- <ShoppingCart size="20" color={darkBlue} className={cn('stroke-0')} variant="Outline" />
78
+ {/* <ShoppingCart size="20" color={darkBlue} className={cn('stroke-0')} variant="Outline" /> */}
79
+ <Icon src={ShoppingCart} attrs={{ width: 20 }} />
77
80
  {maybeItemCounter}
78
81
  </span>
79
82
  </Link>
@@ -84,7 +87,7 @@ const CartTrigger = props => {
84
87
  className={classes.link}
85
88
  onClick={handleLinkClick}
86
89
  >
87
- <Icon src={ShoppingCartIcon} />
90
+ <Icon src={ShoppingCart} attrs={{ width: 20 }} />
88
91
  {maybeItemCounter}
89
92
  </button>
90
93
  </Fragment>
@@ -1,5 +1,5 @@
1
1
  .counter {
2
- composes: absolute from global;
2
+ /* composes: absolute from global; */
3
3
  composes: bg-brand-dark from global;
4
4
  composes: font-medium from global;
5
5
  composes: leading-tight from global;