@weareconceptstudio/account 0.2.2 → 0.2.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/dist/AccountProvider.d.ts +3 -1
- package/dist/AccountProvider.js +14 -5
- package/dist/components/Sequence/Skeleton/index.d.ts +5 -0
- package/dist/components/Sequence/Skeleton/index.js +15 -0
- package/dist/components/Sequence/Skeleton/style.d.ts +2 -0
- package/dist/components/Sequence/Skeleton/style.js +54 -0
- package/dist/components/Sequence/style.js +1 -8
- package/dist/components/SkeletonMaket/index.d.ts +10 -0
- package/dist/components/SkeletonMaket/index.js +8 -0
- package/dist/components/SkeletonMaket/style.d.ts +2 -0
- package/dist/components/SkeletonMaket/style.js +15 -0
- package/dist/components/TotalCheckout/Skeleton/icons.js +1 -1
- package/dist/components/TotalCheckout/style.js +16 -8
- package/dist/modules/account/AccountTemplate/index.js +1 -1
- package/dist/modules/address/SelectAddress/Skeleton/index.d.ts +5 -0
- package/dist/modules/address/SelectAddress/Skeleton/index.js +20 -0
- package/dist/modules/address/SelectAddress/Skeleton/style.d.ts +2 -0
- package/dist/modules/address/SelectAddress/Skeleton/style.js +71 -0
- package/dist/modules/address/ShippingBillingInfo/index.js +1 -1
- package/dist/modules/cart/CartTemplate/Skeleton/index.d.ts +2 -1
- package/dist/modules/cart/CartTemplate/Skeleton/index.js +5 -4
- package/dist/modules/cart/CartTemplate/Skeleton/style.js +14 -0
- package/dist/modules/cart/CartTemplate/index.js +1 -1
- package/dist/modules/cart/SimpleItems/Item/index.js +3 -3
- package/dist/modules/cart/SimpleItems/ItemMobile/index.js +5 -5
- package/dist/modules/checkout/CheckoutTemplate/index.js +10 -3
- package/dist/modules/checkout/ThankYouTemplate/index.js +2 -2
- package/dist/modules/order/OrderedItems/index.js +4 -5
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export function useAccountContext(): any;
|
|
2
|
-
export function AccountProvider({ fontFamily, shopUrl, children, maxQty, currency, addressType, addressFormFields, useUser, useCart }: {
|
|
2
|
+
export function AccountProvider({ fontFamily, shopUrl, children, maxQty, currency, addressType, addressFormFields, useUser, useCart, productPopup, productUrlPrefix }: {
|
|
3
3
|
fontFamily?: string;
|
|
4
4
|
shopUrl?: string;
|
|
5
5
|
children: any;
|
|
@@ -9,5 +9,7 @@ export function AccountProvider({ fontFamily, shopUrl, children, maxQty, currenc
|
|
|
9
9
|
addressFormFields: any;
|
|
10
10
|
useUser: any;
|
|
11
11
|
useCart: any;
|
|
12
|
+
productPopup: any;
|
|
13
|
+
productUrlPrefix: any;
|
|
12
14
|
}): React.JSX.Element;
|
|
13
15
|
import React from 'react';
|
package/dist/AccountProvider.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React, { createContext, useContext, useEffect } from 'react';
|
|
2
|
-
import { useTranslation } from '@weareconceptstudio/core';
|
|
1
|
+
import React, { createContext, useCallback, useContext, useEffect } from 'react';
|
|
2
|
+
import { useTranslation, useUi } from '@weareconceptstudio/core';
|
|
3
3
|
import { ThemeProvider } from 'styled-components';
|
|
4
4
|
import { AddressProvider } from './modules/address/AddressProvider';
|
|
5
5
|
//* Translations
|
|
@@ -14,13 +14,22 @@ export const useAccountContext = () => {
|
|
|
14
14
|
const context = useContext(AccountContext);
|
|
15
15
|
return context;
|
|
16
16
|
};
|
|
17
|
-
export const AccountProvider = ({ fontFamily = 'core_Font', shopUrl = '/', children, maxQty = 99, currency, addressType, addressFormFields, useUser, useCart }) => {
|
|
17
|
+
export const AccountProvider = ({ fontFamily = 'core_Font', shopUrl = '/', children, maxQty = 99, currency, addressType, addressFormFields, useUser, useCart, productPopup, productUrlPrefix }) => {
|
|
18
18
|
const { addTranslation } = useTranslation();
|
|
19
|
+
const { openPopup } = useUi();
|
|
19
20
|
useEffect(() => {
|
|
20
21
|
addTranslation(translations, 'prepend');
|
|
21
22
|
}, []);
|
|
22
|
-
|
|
23
|
-
|
|
23
|
+
const handleProductClick = useCallback((product) => {
|
|
24
|
+
if (productUrlPrefix) {
|
|
25
|
+
console.log('Redirect for other project');
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
openPopup(productPopup, { ...product, className: 'popup-product-block' });
|
|
29
|
+
}
|
|
30
|
+
}, [productUrlPrefix, productPopup]);
|
|
31
|
+
return (React.createElement(AccountContext.Provider, { value: { currency, maxQty, shopUrl, useUser, useCart, handleProductClick } },
|
|
32
|
+
React.createElement(AddressProvider, { useUser: useUser, useCart: useCart, addressType: addressType, addressFormFields: addressFormFields },
|
|
24
33
|
React.createElement(ThemeProvider, { theme: theme },
|
|
25
34
|
React.createElement(AccountVariables, { fontFamily: fontFamily }),
|
|
26
35
|
React.createElement(AccountHelperClass, null),
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
//* Styles
|
|
3
|
+
import SequenceSkeletonStyle from './style';
|
|
4
|
+
import SequenceStyle from '../style';
|
|
5
|
+
//* Skeleton file
|
|
6
|
+
import SkeletonInitial from '../../SkeletonMaket';
|
|
7
|
+
const SequenceSkeleton = ({ className }) => {
|
|
8
|
+
return (React.createElement(SequenceStyle, null,
|
|
9
|
+
React.createElement(SequenceSkeletonStyle, { className: className || ' ' }, Array.from({ length: 4 }).map((_, i, arr) => {
|
|
10
|
+
return (React.createElement("div", { key: i, className: 'wrapper-item-line' },
|
|
11
|
+
React.createElement(SkeletonInitial, { className: 'line', height: `var(--heightCircleItem)`, fontSize: `var(--account_p3)`, lineHeight: `var(--account_lineHeight)`, textLength: 12 }),
|
|
12
|
+
i < arr.length - 1 ? (React.createElement(SkeletonInitial, { className: 'item-sequence', height: `var(--heightLine)`, width: `var(--widthLine)` })) : null));
|
|
13
|
+
}))));
|
|
14
|
+
};
|
|
15
|
+
export default SequenceSkeleton;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export default SequenceSkeletonStyle;
|
|
2
|
+
declare const SequenceSkeletonStyle: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
const SequenceSkeletonStyle = styled.div `
|
|
3
|
+
--account_sequenceMB: var(--sp8x);
|
|
4
|
+
--heightCircleItem: var(--sp1x);
|
|
5
|
+
--widthLine: var(--account_stepLineWidth);
|
|
6
|
+
--heightLine: 2px;
|
|
7
|
+
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-direction: row;
|
|
10
|
+
align-items: center;
|
|
11
|
+
gap: var(--account_stepML);
|
|
12
|
+
row-gap: var(--sp1-5x);
|
|
13
|
+
flex-wrap: wrap;
|
|
14
|
+
|
|
15
|
+
.wrapper-item-line {
|
|
16
|
+
display: flex;
|
|
17
|
+
align-items: center;
|
|
18
|
+
gap: var(--account_stepML);
|
|
19
|
+
flex-wrap: wrap;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
&.sequence-checkout-template {
|
|
23
|
+
margin-bottom: var(--account_sequenceMB);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
@media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeXLMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeL}) {
|
|
27
|
+
--account_sequenceMB: var(--sp5x);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
@media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeLMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeM}) {
|
|
31
|
+
--account_sequenceMB: var(--sp5x);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
@media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeMMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeS}) {
|
|
35
|
+
--account_sequenceMB: var(--sp5x);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
@media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeSMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeXS}) {
|
|
39
|
+
--account_sequenceMB: var(--sp5x);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
@media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeXSMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_TabletSize}) {
|
|
43
|
+
--account_sequenceMB: var(--sp5x);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
@media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_TabletSizeMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_TabletSizeS}) {
|
|
47
|
+
--account_sequenceMB: var(--sp4x);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
@media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_TabletSizeSMin}) {
|
|
51
|
+
--account_sequenceMB: var(--sp4x);
|
|
52
|
+
}
|
|
53
|
+
`;
|
|
54
|
+
export default SequenceSkeletonStyle;
|
|
@@ -27,6 +27,7 @@ const SequenceStyle = styled.section `
|
|
|
27
27
|
.steps-container {
|
|
28
28
|
display: flex;
|
|
29
29
|
flex-wrap: wrap;
|
|
30
|
+
row-gap: var(--account_stepML);
|
|
30
31
|
|
|
31
32
|
.step {
|
|
32
33
|
display: flex;
|
|
@@ -304,14 +305,6 @@ const SequenceStyle = styled.section `
|
|
|
304
305
|
--account_stepLineML: var(--sp1x);
|
|
305
306
|
--account_stepML: var(--sp1x);
|
|
306
307
|
--account_sequenceMB: var(--sp4x);
|
|
307
|
-
|
|
308
|
-
.steps-container {
|
|
309
|
-
margin-top: calc(-1 * var(--sp1-5x));
|
|
310
|
-
|
|
311
|
-
.step {
|
|
312
|
-
margin-top: var(--sp1-5x);
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
308
|
}
|
|
316
309
|
`;
|
|
317
310
|
export default SequenceStyle;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export default SkeletonInitial;
|
|
2
|
+
declare function SkeletonInitial({ fontSize, lineHeight, width, className, height, textLength }: {
|
|
3
|
+
fontSize: any;
|
|
4
|
+
lineHeight: any;
|
|
5
|
+
width: any;
|
|
6
|
+
className: any;
|
|
7
|
+
height: any;
|
|
8
|
+
textLength: any;
|
|
9
|
+
}): React.JSX.Element;
|
|
10
|
+
import React from 'react';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
//* Styles
|
|
3
|
+
import SkeletonInitialStyle from './style';
|
|
4
|
+
const SkeletonInitial = ({ fontSize, lineHeight, width, className, height, textLength }) => {
|
|
5
|
+
return (React.createElement(SkeletonInitialStyle, { "$$lineHeight": lineHeight, "$$fontSize": fontSize, "$$width": width, "$$heightVariable": height, "$$textLength": textLength, className: className },
|
|
6
|
+
React.createElement("div", { className: 'skeleton-container' })));
|
|
7
|
+
};
|
|
8
|
+
export default SkeletonInitial;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export default SkeletonInitialStyle;
|
|
2
|
+
declare const SkeletonInitialStyle: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
const SkeletonInitialStyle = styled.div `
|
|
3
|
+
--initialColor: #eff1f2;
|
|
4
|
+
|
|
5
|
+
--averageCharWidth: 0.6;
|
|
6
|
+
--defaultWidth: calc(var(--averageCharWidth) *);
|
|
7
|
+
--defaultWidth: ${({ $$width, $$fontSize, $$textLength }) => $$width || ($$fontSize && $$textLength ? `calc(var(--averageCharWidth) * ${$$fontSize} * ${$$textLength})` : '7vw')};
|
|
8
|
+
|
|
9
|
+
height: ${({ $$lineHeight, $$fontSize, $$heightVariable }) => `max(${$$heightVariable || '0px'}, calc(${$$fontSize || '0'} * ${$$lineHeight || '0px'}))`};
|
|
10
|
+
width: var(--defaultWidth);
|
|
11
|
+
|
|
12
|
+
border-radius: var(--sp3x);
|
|
13
|
+
background-color: var(--initialColor);
|
|
14
|
+
`;
|
|
15
|
+
export default SkeletonInitialStyle;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export const skeletonTotal = (React.createElement("svg", { xmlns: 'http://www.w3.org/2000/svg', width: '528', height: '290', viewBox: '0 0 528 290', fill: 'none' },
|
|
3
|
-
React.createElement("line", { y1: '45', x2: '528', y2: '45', stroke: '#EFF1F2',
|
|
3
|
+
React.createElement("line", { y1: '45', x2: '528', y2: '45', stroke: '#EFF1F2', strokeWidth: '2' }),
|
|
4
4
|
React.createElement("rect", { width: '160', height: '30', rx: '12', fill: '#EFF1F2' }),
|
|
5
5
|
React.createElement("rect", { y: '82', width: '90', height: '21', rx: '10.5', fill: '#EFF1F2' }),
|
|
6
6
|
React.createElement("rect", { x: '391', y: '82', width: '137', height: '21', rx: '10.5', fill: '#EFF1F2' }),
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import styled from 'styled-components';
|
|
2
2
|
const TotalCheckoutStyle = styled.section `
|
|
3
3
|
--account_distance: var(--sp14x);
|
|
4
|
-
--account_rightPanelWrapWidth: var(--sp85x);
|
|
4
|
+
/* --account_rightPanelWrapWidth: var(--sp85x); */
|
|
5
|
+
--account_rightPanelWrapWidth: 23.01%;
|
|
5
6
|
--account_cartMainWrapPadTop: var(--sp8x);
|
|
6
7
|
--account_leftPanelWrapWidth: calc(100% - var(--account_rightPanelWrapWidth));
|
|
7
8
|
|
|
@@ -26,8 +27,10 @@ const TotalCheckoutStyle = styled.section `
|
|
|
26
27
|
}
|
|
27
28
|
|
|
28
29
|
.right-panel-wrap {
|
|
29
|
-
|
|
30
|
-
|
|
30
|
+
width: var(--account_rightPanelWrapWidth);
|
|
31
|
+
|
|
32
|
+
/* max-width: var(--account_rightPanelWrapWidth);
|
|
33
|
+
width: 100%; */
|
|
31
34
|
|
|
32
35
|
.max-width-wrapper {
|
|
33
36
|
.od-line {
|
|
@@ -66,7 +69,8 @@ const TotalCheckoutStyle = styled.section `
|
|
|
66
69
|
|
|
67
70
|
@media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeXLMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeL}) {
|
|
68
71
|
--account_distance: var(--sp8x);
|
|
69
|
-
--account_rightPanelWrapWidth: var(--sp66x);
|
|
72
|
+
/* --account_rightPanelWrapWidth: var(--sp66x); */
|
|
73
|
+
--account_rightPanelWrapWidth: 29.21%;
|
|
70
74
|
--account_cartMainWrapPadTop: var(--sp5x);
|
|
71
75
|
|
|
72
76
|
//! Right Layout Sizes
|
|
@@ -80,7 +84,8 @@ const TotalCheckoutStyle = styled.section `
|
|
|
80
84
|
|
|
81
85
|
@media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeLMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeM}) {
|
|
82
86
|
--account_distance: var(--sp8x);
|
|
83
|
-
--account_rightPanelWrapWidth: var(--sp50x);
|
|
87
|
+
/* --account_rightPanelWrapWidth: var(--sp50x); */
|
|
88
|
+
--account_rightPanelWrapWidth: 27.67%;
|
|
84
89
|
--account_cartMainWrapPadTop: var(--sp5x);
|
|
85
90
|
|
|
86
91
|
//! Right Layout Sizes
|
|
@@ -94,7 +99,8 @@ const TotalCheckoutStyle = styled.section `
|
|
|
94
99
|
|
|
95
100
|
@media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeMMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeS}) {
|
|
96
101
|
--account_distance: var(--sp6x);
|
|
97
|
-
--account_rightPanelWrapWidth: var(--sp50x);
|
|
102
|
+
/* --account_rightPanelWrapWidth: var(--sp50x); */
|
|
103
|
+
--account_rightPanelWrapWidth: 29.07%;
|
|
98
104
|
--account_cartMainWrapPadTop: var(--sp4x);
|
|
99
105
|
|
|
100
106
|
//! Right Layout Sizes
|
|
@@ -108,7 +114,8 @@ const TotalCheckoutStyle = styled.section `
|
|
|
108
114
|
|
|
109
115
|
@media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeSMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeXS}) {
|
|
110
116
|
--account_distance: var(--sp5x);
|
|
111
|
-
--account_rightPanelWrapWidth: var(--sp46x);
|
|
117
|
+
/* --account_rightPanelWrapWidth: var(--sp46x); */
|
|
118
|
+
--account_rightPanelWrapWidth: 29.68%;
|
|
112
119
|
--account_cartMainWrapPadTop: var(--sp4x);
|
|
113
120
|
|
|
114
121
|
//! Right Layout Sizes
|
|
@@ -122,7 +129,8 @@ const TotalCheckoutStyle = styled.section `
|
|
|
122
129
|
|
|
123
130
|
@media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeXSMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_TabletSize}) {
|
|
124
131
|
--account_distance: var(--sp3x);
|
|
125
|
-
--account_rightPanelWrapWidth: var(--sp38x);
|
|
132
|
+
/* --account_rightPanelWrapWidth: var(--sp38x); */
|
|
133
|
+
--account_rightPanelWrapWidth: 30.9%;
|
|
126
134
|
--account_cartMainWrapPadTop: var(--sp4x);
|
|
127
135
|
|
|
128
136
|
//! Right Layout Sizes
|
|
@@ -2,7 +2,7 @@ import React, { useMemo } from 'react';
|
|
|
2
2
|
import { Text, Link, useUi, Page } from '@weareconceptstudio/core';
|
|
3
3
|
import AccountStyle from './style';
|
|
4
4
|
import { useAccountContext } from '../../../AccountProvider';
|
|
5
|
-
const AccountTemplate = ({ isFullWidth =
|
|
5
|
+
const AccountTemplate = ({ isFullWidth = true, menuOptions = [], children }) => {
|
|
6
6
|
const { winWidth } = useUi();
|
|
7
7
|
const { useUser } = useAccountContext();
|
|
8
8
|
const { user, isLoggedIn, signOut } = useUser();
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
//* Styles
|
|
3
|
+
import SkeletonAddressSelectStyle from './style';
|
|
4
|
+
import AddressItemStyle from '../../AddressItem/style';
|
|
5
|
+
//* Component
|
|
6
|
+
import SkeletonInitial from '../../../../components/SkeletonMaket';
|
|
7
|
+
const SkeletonAddressSelect = ({ className }) => {
|
|
8
|
+
return (React.createElement(AddressItemStyle, { className: 'full' },
|
|
9
|
+
React.createElement(SkeletonAddressSelectStyle, { className: className || ' ' },
|
|
10
|
+
React.createElement("div", { className: 'wrapper-title title' },
|
|
11
|
+
React.createElement(SkeletonInitial, { fontSize: 'var(--account_p2)', lineHeight: 'var(--account_lineHeight)', textLength: 10 }),
|
|
12
|
+
React.createElement(SkeletonInitial, { fontSize: 'var(--account_p3)', lineHeight: 'var(--account_lineHeight)', textLength: 10 })),
|
|
13
|
+
React.createElement("div", { className: 'item-internal-wrap' },
|
|
14
|
+
React.createElement(SkeletonInitial, { fontSize: 'var(--account_p3)', lineHeight: 'var(--account_lineHeight)', textLength: 18 }),
|
|
15
|
+
React.createElement(SkeletonInitial, { className: 'item-address', fontSize: 'var(--account_p3)', lineHeight: 'var(--account_lineHeight)', textLength: 30 }),
|
|
16
|
+
React.createElement(SkeletonInitial, { className: 'item-address', fontSize: 'var(--account_p3)', lineHeight: 'var(--account_lineHeight)', textLength: 24 }),
|
|
17
|
+
React.createElement(SkeletonInitial, { className: 'item-address', fontSize: 'var(--account_p3)', lineHeight: 'var(--account_lineHeight)', textLength: 16 }),
|
|
18
|
+
React.createElement(SkeletonInitial, { className: 'item-address-end', fontSize: 'var(--account_p3)', lineHeight: 'var(--account_lineHeight)', textLength: 27 })))));
|
|
19
|
+
};
|
|
20
|
+
export default SkeletonAddressSelect;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export default SkeletonAddressSelectStyle;
|
|
2
|
+
declare const SkeletonAddressSelectStyle: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
const SkeletonAddressSelectStyle = styled.div `
|
|
3
|
+
--account_checkoutMTop: var(--sp16x);
|
|
4
|
+
--account_changeAddressWrapMBot: var(--sp5x);
|
|
5
|
+
|
|
6
|
+
margin-left: calc(-1 * calc(var(--account_itemDistance) / 2));
|
|
7
|
+
margin-right: calc(-1 * calc(var(--account_itemDistance) / 2));
|
|
8
|
+
|
|
9
|
+
.item-internal-wrap {
|
|
10
|
+
border-color: #eff1f2;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
&.address-checkout-template {
|
|
14
|
+
margin-bottom: var(--account_checkoutMTop);
|
|
15
|
+
|
|
16
|
+
.title {
|
|
17
|
+
margin-bottom: var(--account_changeAddressWrapMBot);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.wrapper-title {
|
|
22
|
+
display: flex;
|
|
23
|
+
justify-content: space-between;
|
|
24
|
+
align-items: flex-end;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.item-address {
|
|
28
|
+
margin-top: var(--account_smallMarginDistance);
|
|
29
|
+
|
|
30
|
+
&-end {
|
|
31
|
+
margin-top: var(--account_marginTopSize);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
@media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeXLMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeL}) {
|
|
36
|
+
--account_checkoutMTop: var(--sp11x);
|
|
37
|
+
--account_changeAddressWrapMBot: var(--sp4x);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
@media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeLMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeM}) {
|
|
41
|
+
--account_checkoutMTop: var(--sp8x);
|
|
42
|
+
--account_changeAddressWrapMBot: var(--sp4x);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
@media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeMMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeS}) {
|
|
46
|
+
--account_checkoutMTop: var(--sp8x);
|
|
47
|
+
--account_changeAddressWrapMBot: var(--sp3x);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
@media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeSMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeXS}) {
|
|
51
|
+
--account_checkoutMTop: var(--sp8x);
|
|
52
|
+
--account_changeAddressWrapMBot: var(--sp3x);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
@media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeXSMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_TabletSize}) {
|
|
56
|
+
--account_checkoutMTop: var(--sp8x);
|
|
57
|
+
--account_changeAddressWrapMBot: var(--sp3x);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
@media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_TabletSizeMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_TabletSizeS}) {
|
|
61
|
+
--account_checkoutMTop: var(--sp8x);
|
|
62
|
+
--account_changeAddressWrapMBot: var(--sp3x);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
@media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_TabletSizeSMin}) {
|
|
66
|
+
--account_checkoutMTop: var(--sp10x);
|
|
67
|
+
--account_changeAddressWrapMBot: var(--sp2x);
|
|
68
|
+
margin-top: calc(var(--sp2x) * -1);
|
|
69
|
+
}
|
|
70
|
+
`;
|
|
71
|
+
export default SkeletonAddressSelectStyle;
|
|
@@ -3,7 +3,7 @@ import { Text } from '@weareconceptstudio/core';
|
|
|
3
3
|
//* Style
|
|
4
4
|
import ShippingBillingInfoStyle from './style';
|
|
5
5
|
import { useAddressContext } from '../AddressProvider';
|
|
6
|
-
// TODO:
|
|
6
|
+
// TODO: Address info to component
|
|
7
7
|
const ShippingBillingInfo = memo(({ className, shipping_address, billing_address }) => {
|
|
8
8
|
const { addressType } = useAddressContext();
|
|
9
9
|
return (React.createElement(ShippingBillingInfoStyle, { className: `${className || ''}` },
|
|
@@ -1,18 +1,19 @@
|
|
|
1
|
+
import { useUi } from '@weareconceptstudio/core';
|
|
1
2
|
import React from 'react';
|
|
2
3
|
//* Styles
|
|
3
4
|
import SkeletonCartTemplateStyle from './style';
|
|
4
5
|
//* Files Skeleton
|
|
5
6
|
import { skeletonCategoryName, skeletonMenuTitle, skeletonShopUrl, skeletonCategoryNameAdapting } from './icons';
|
|
7
|
+
//*Component
|
|
6
8
|
import SkeletonItemCart from './SkeletonItem';
|
|
7
|
-
|
|
8
|
-
const SkeletonCartTemplate = ({ shopUrl }) => {
|
|
9
|
+
const SkeletonCartTemplate = ({ shopUrl, isCheckout }) => {
|
|
9
10
|
const { winWidth } = useUi();
|
|
10
|
-
return (React.createElement(SkeletonCartTemplateStyle,
|
|
11
|
+
return (React.createElement(SkeletonCartTemplateStyle, { className: isCheckout ? 'checkout-style' : ' ' },
|
|
11
12
|
React.createElement("div", { className: 'left-bar' },
|
|
12
13
|
shopUrl ? React.createElement("div", { className: 'wrapper-url' }, skeletonShopUrl) : React.createElement(React.Fragment, null),
|
|
13
14
|
React.createElement("div", { className: 'wrapper-cat' },
|
|
14
15
|
React.createElement("div", { className: 'title-wrapper' }, skeletonMenuTitle),
|
|
15
|
-
React.createElement("div", { className: 'order-items-line' }),
|
|
16
|
+
isCheckout ? null : React.createElement("div", { className: 'order-items-line' }),
|
|
16
17
|
winWidth < 1510 ? (React.createElement("div", { className: 'category-name' }, skeletonCategoryNameAdapting)) : (React.createElement("div", { className: 'category-name' }, Array.from({ length: 4 }).map((_, i) => {
|
|
17
18
|
return React.createElement("div", { key: i }, skeletonCategoryName);
|
|
18
19
|
})))),
|
|
@@ -4,6 +4,7 @@ const SkeletonCartTemplateStyle = styled.section `
|
|
|
4
4
|
--account_spaceLineMBot: var(--sp7x);
|
|
5
5
|
--account_orderItemsTitleWrapPB: var(--sp3x);
|
|
6
6
|
--account_itemWrapPadTB: var(--sp5x);
|
|
7
|
+
--account_titleEditWrapperMBot: var(--sp5x);
|
|
7
8
|
|
|
8
9
|
svg {
|
|
9
10
|
display: block;
|
|
@@ -65,22 +66,31 @@ const SkeletonCartTemplateStyle = styled.section `
|
|
|
65
66
|
background-color: #eff1f2;
|
|
66
67
|
}
|
|
67
68
|
|
|
69
|
+
&.checkout-style {
|
|
70
|
+
.title-wrapper {
|
|
71
|
+
margin-bottom: var(--account_titleEditWrapperMBot);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
68
75
|
@media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeXLMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeL}) {
|
|
69
76
|
--account_spaceLineMBot: var(--sp5x);
|
|
70
77
|
--account_orderItemsTitleWrapPB: var(--sp3x);
|
|
71
78
|
--account_itemWrapPadTB: var(--sp4x);
|
|
79
|
+
--account_titleEditWrapperMBot: var(--sp4x);
|
|
72
80
|
}
|
|
73
81
|
|
|
74
82
|
@media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeLMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeM}) {
|
|
75
83
|
--account_spaceLineMBot: var(--sp4x);
|
|
76
84
|
--account_orderItemsTitleWrapPB: var(--sp2x);
|
|
77
85
|
--account_itemWrapPadTB: var(--sp3x);
|
|
86
|
+
--account_titleEditWrapperMBot: var(--sp2x);
|
|
78
87
|
}
|
|
79
88
|
|
|
80
89
|
@media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeMMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeS}) {
|
|
81
90
|
--account_spaceLineMBot: var(--sp4x);
|
|
82
91
|
--account_orderItemsTitleWrapPB: var(--sp2x);
|
|
83
92
|
--account_itemWrapPadTB: var(--sp3x);
|
|
93
|
+
--account_titleEditWrapperMBot: var(--sp3x);
|
|
84
94
|
|
|
85
95
|
.category-name,
|
|
86
96
|
.cart-desktop-wrapper {
|
|
@@ -92,6 +102,7 @@ const SkeletonCartTemplateStyle = styled.section `
|
|
|
92
102
|
--account_spaceLineMBot: var(--sp3x);
|
|
93
103
|
--account_orderItemsTitleWrapPB: var(--sp2x);
|
|
94
104
|
--account_itemWrapPadTB: var(--sp3x);
|
|
105
|
+
--account_titleEditWrapperMBot: var(--sp4x);
|
|
95
106
|
|
|
96
107
|
.skeleton-cart-middle {
|
|
97
108
|
padding-left: var(--sp1x);
|
|
@@ -111,6 +122,7 @@ const SkeletonCartTemplateStyle = styled.section `
|
|
|
111
122
|
--account_spaceLineMBot: var(--sp3x);
|
|
112
123
|
--account_orderItemsTitleWrapPB: var(--sp2x);
|
|
113
124
|
--account_itemWrapPadTB: var(--sp3x);
|
|
125
|
+
--account_titleEditWrapperMBot: var(--sp3x);
|
|
114
126
|
|
|
115
127
|
.skeleton-cart-middle {
|
|
116
128
|
padding-left: var(--sp1x);
|
|
@@ -130,6 +142,7 @@ const SkeletonCartTemplateStyle = styled.section `
|
|
|
130
142
|
--account_spaceLineMBot: var(--sp3x);
|
|
131
143
|
--account_orderItemsTitleWrapPB: var(--sp2x);
|
|
132
144
|
--account_itemWrapPadTB: var(--sp3x);
|
|
145
|
+
--account_titleEditWrapperMBot: var(--sp3x);
|
|
133
146
|
|
|
134
147
|
.skeleton-cart-middle {
|
|
135
148
|
padding-left: var(--sp1x);
|
|
@@ -147,6 +160,7 @@ const SkeletonCartTemplateStyle = styled.section `
|
|
|
147
160
|
|
|
148
161
|
@media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_TabletSizeSMin}) {
|
|
149
162
|
--account_spaceLineMBot: 0;
|
|
163
|
+
--account_titleEditWrapperMBot: var(--sp2x);
|
|
150
164
|
|
|
151
165
|
.category-name {
|
|
152
166
|
display: none;
|
|
@@ -17,7 +17,7 @@ const CartTemplate = ({ children, actions, btnDisabled, checkoutUrl = '/checkout
|
|
|
17
17
|
const { translate } = useTranslation();
|
|
18
18
|
const { items, itemsCount, shippingCost, loading, subtotal, total } = useCart();
|
|
19
19
|
return (React.createElement(Page, { className: 'cart use-account' },
|
|
20
|
-
React.createElement(AccountContainer,
|
|
20
|
+
React.createElement(AccountContainer, { className: `second-version` },
|
|
21
21
|
React.createElement(CartTemplateStyle, null,
|
|
22
22
|
React.createElement(TotalCheckout, { total: total, subtotal: subtotal, itemsCount: itemsCount, shippingCost: shippingCost, loading: loading, buttonProps: {
|
|
23
23
|
url: checkoutUrl,
|
|
@@ -3,9 +3,9 @@ import { Image, Text } from '@weareconceptstudio/core';
|
|
|
3
3
|
import { Select } from '@weareconceptstudio/form';
|
|
4
4
|
import { handlePriceCheckFunc } from '../../../../utils/_functions';
|
|
5
5
|
import { AccountButton } from '../../../../components';
|
|
6
|
-
|
|
7
|
-
const pathname = '/cart/';
|
|
6
|
+
import { useAccountContext } from '../../../../AccountProvider';
|
|
8
7
|
const Item = memo(({ data, remove, select, isLast, actions, maxQty, currency }) => {
|
|
8
|
+
const { handleProductClick } = useAccountContext();
|
|
9
9
|
const selectionList = useMemo(() => {
|
|
10
10
|
if (select) {
|
|
11
11
|
const selectList = [];
|
|
@@ -22,7 +22,7 @@ const Item = memo(({ data, remove, select, isLast, actions, maxQty, currency })
|
|
|
22
22
|
React.createElement("div", { className: `image-wrapper` },
|
|
23
23
|
React.createElement(Image, { src: data.product.image.src, alt: data.product.image.alt })),
|
|
24
24
|
React.createElement("div", { className: `col-1-right-wrap` },
|
|
25
|
-
React.createElement(AccountButton, { text: data.product.name, btnType: `green-large-text`,
|
|
25
|
+
React.createElement(AccountButton, { text: data.product.name, btnType: `green-large-text`, className: `capitalize title-btn`, onClick: () => handleProductClick(data.product) }),
|
|
26
26
|
React.createElement("div", { className: `right-first-item-wrap` },
|
|
27
27
|
React.createElement(Text, { className: `account-p account-p3 account-font-regular account-primary-color1`, text: data.product.short_info_1 })),
|
|
28
28
|
React.createElement("div", { className: `right-second-item-wrap` },
|
|
@@ -3,9 +3,9 @@ import { Image, Text } from '@weareconceptstudio/core';
|
|
|
3
3
|
import { Select } from '@weareconceptstudio/form';
|
|
4
4
|
import { AccountButton } from '../../../../components';
|
|
5
5
|
import { handlePriceCheckFunc } from '../../../../utils/_functions';
|
|
6
|
-
|
|
7
|
-
const pathname = '/cart/';
|
|
6
|
+
import { useAccountContext } from '../../../../AccountProvider';
|
|
8
7
|
const ItemMobile = memo(({ data, remove, select, actions, maxQty, currency }) => {
|
|
8
|
+
const { handleProductClick } = useAccountContext();
|
|
9
9
|
const selectionList = useMemo(() => {
|
|
10
10
|
if (select) {
|
|
11
11
|
const selectList = [];
|
|
@@ -21,7 +21,7 @@ const ItemMobile = memo(({ data, remove, select, actions, maxQty, currency }) =>
|
|
|
21
21
|
React.createElement("div", { className: `mobile-image-wrap` },
|
|
22
22
|
React.createElement(Image, { src: data.product.image.src, alt: data.product.image.alt })),
|
|
23
23
|
React.createElement("div", { className: `mobile-info-wrap` },
|
|
24
|
-
React.createElement(AccountButton, { text: data.product.name, btnType: `green-large-text`,
|
|
24
|
+
React.createElement(AccountButton, { text: data.product.name, btnType: `green-large-text`, className: `capitalize mobile-info-wrap-title`, onClick: () => handleProductClick(data.product) }),
|
|
25
25
|
React.createElement("div", { className: 'mobile-info-item' },
|
|
26
26
|
React.createElement(Text, { className: `account-p account-p3 account-font-regular account-primary-color1 mobile-short-info1`, text: data.product.short_info_1 })),
|
|
27
27
|
React.createElement("div", { className: 'mobile-info-item' },
|
|
@@ -46,9 +46,9 @@ const ItemMobile = memo(({ data, remove, select, actions, maxQty, currency }) =>
|
|
|
46
46
|
data.product?.sale_price ? (React.createElement("div", null,
|
|
47
47
|
React.createElement(Text, { className: `account-p account-p3 account-font-bold account-secondary-color2 mobile-total-discounted-price`, text: `${data.sale_total} ${currency}` }),
|
|
48
48
|
React.createElement(Text, { className: `account-p account-p3 account-font-regular account-primary-color2 line-through mobile-total-price`, text: handlePriceCheckFunc(data.product.price * data.qty, currency) }))) : (React.createElement(Text, { className: `account-p account-p3 account-font-bold account-primary-color1 mobile-total-price2`, text: `${data.total} ${currency}` }))))),
|
|
49
|
-
|
|
49
|
+
React.createElement("div", { className: `edit-remove-favorite-mobile-wrap` },
|
|
50
50
|
React.createElement("div", { className: 'empty' }),
|
|
51
|
-
React.createElement("div", { className: `favorite-remove-mobile-wrap` }, remove && (React.createElement(AccountButton, { text: 'remove', btnType: `green-small-text`, onClick: () => actions.delete({ productId: data.product.id }) })))))
|
|
51
|
+
React.createElement("div", { className: `favorite-remove-mobile-wrap` }, remove && (React.createElement(AccountButton, { text: 'remove', btnType: `green-small-text`, onClick: () => actions.delete({ productId: data.product.id }) }))))),
|
|
52
52
|
React.createElement("div", { className: 'line' })));
|
|
53
53
|
});
|
|
54
54
|
export default ItemMobile;
|
|
@@ -8,6 +8,10 @@ import StepShipping from './StepShipping';
|
|
|
8
8
|
import AccountContainer from '../../../components/AccountContainer';
|
|
9
9
|
//* Styles
|
|
10
10
|
import CheckoutTemplateStyle from './style';
|
|
11
|
+
//* Skeleton
|
|
12
|
+
import SkeletonCartTemplate from '../../cart/CartTemplate/Skeleton';
|
|
13
|
+
import SequenceSkeleton from '../../../components/Sequence/Skeleton';
|
|
14
|
+
import SkeletonAddressSelect from '../../address/SelectAddress/Skeleton';
|
|
11
15
|
const CheckoutTemplate = () => {
|
|
12
16
|
const { checkoutAddressId } = useAddressContext();
|
|
13
17
|
const { useCart } = useAccountContext();
|
|
@@ -47,9 +51,9 @@ const CheckoutTemplate = () => {
|
|
|
47
51
|
checkStep.isShipping ? handleCheckoutFirstStep() : handleCheckoutSecondStep();
|
|
48
52
|
}, [checkStep]);
|
|
49
53
|
return (React.createElement(Page, { className: 'checkout use-account' },
|
|
50
|
-
React.createElement(AccountContainer,
|
|
54
|
+
React.createElement(AccountContainer, { className: `second-version` },
|
|
51
55
|
React.createElement(CheckoutTemplateStyle, null,
|
|
52
|
-
React.createElement(TotalCheckout, { isCheckout: true, total: total, subtotal: subtotal, itemsCount: itemsCount, shippingCost: shippingCost, isShipping: checkStep.isShipping, checkoutData: checkoutData, fillCheckoutData: fillCheckoutData, buttonProps: {
|
|
56
|
+
React.createElement(TotalCheckout, { isCheckout: true, total: total, subtotal: subtotal, itemsCount: itemsCount, shippingCost: shippingCost, isShipping: checkStep.isShipping, checkoutData: checkoutData, fillCheckoutData: fillCheckoutData, loading: addressLoading, buttonProps: {
|
|
53
57
|
url: false,
|
|
54
58
|
disabled: false,
|
|
55
59
|
handleClick: handleCheckoutBtn,
|
|
@@ -57,6 +61,9 @@ const CheckoutTemplate = () => {
|
|
|
57
61
|
text: checkStep.isShipping ? 'proceedToCheckout' : 'proceedToPayment',
|
|
58
62
|
} }, !addressLoading ? (React.createElement(React.Fragment, null,
|
|
59
63
|
React.createElement(Sequence, { step: checkStep.isShipping ? 'shipping' : 'review' }),
|
|
60
|
-
checkStep.isShipping ? React.createElement(StepShipping, { firstStepFormRef: firstStepFormRef }) : React.createElement(StepReview, { items: items }))) : null
|
|
64
|
+
checkStep.isShipping ? React.createElement(StepShipping, { firstStepFormRef: firstStepFormRef }) : React.createElement(StepReview, { items: items }))) : (React.createElement(React.Fragment, null,
|
|
65
|
+
React.createElement(SequenceSkeleton, { className: 'sequence-checkout-template' }),
|
|
66
|
+
React.createElement(SkeletonAddressSelect, { className: 'address-checkout-template' }),
|
|
67
|
+
React.createElement(SkeletonCartTemplate, { isCheckout: true }))))))));
|
|
61
68
|
};
|
|
62
69
|
export default CheckoutTemplate;
|
|
@@ -13,9 +13,9 @@ const ThankYouTemplate = ({ orderNumber }) => {
|
|
|
13
13
|
useEffect(() => {
|
|
14
14
|
cart.clearCart();
|
|
15
15
|
}, []);
|
|
16
|
-
return (React.createElement(Page, { className: 'use-account' },
|
|
16
|
+
return (React.createElement(Page, { className: 'thank-you-message use-account' },
|
|
17
17
|
React.createElement(ThankYouMessageStyle, null,
|
|
18
|
-
React.createElement(AccountContainer,
|
|
18
|
+
React.createElement(AccountContainer, { className: 'second-version' },
|
|
19
19
|
React.createElement(Sequence, { step: 'confirmed' }),
|
|
20
20
|
React.createElement("div", { className: `confirmation-wrapper` },
|
|
21
21
|
React.createElement("div", { className: 'confirmation-image' }, confirmImage),
|
|
@@ -4,10 +4,9 @@ import { handlePriceCheckFunc } from '../../../utils/_functions';
|
|
|
4
4
|
import { useAccountContext } from '../../../AccountProvider';
|
|
5
5
|
import { AccountButton } from '../../../components';
|
|
6
6
|
import OrderedItemsStyle from './style';
|
|
7
|
-
// TODO: product url
|
|
8
7
|
const OrderedItems = ({ data: items, status }) => {
|
|
9
8
|
const { winWidth } = useUi();
|
|
10
|
-
const { currency } = useAccountContext();
|
|
9
|
+
const { currency, handleProductClick } = useAccountContext();
|
|
11
10
|
//! Store order items
|
|
12
11
|
const storeOrderedItems = useMemo(() => {
|
|
13
12
|
return items?.length > 0
|
|
@@ -17,7 +16,7 @@ const OrderedItems = ({ data: items, status }) => {
|
|
|
17
16
|
React.createElement("div", { className: `image-wrapper` },
|
|
18
17
|
React.createElement(Image, { src: item.product.image.src, alt: item.product.image.alt })),
|
|
19
18
|
React.createElement("div", { className: `col-1-right-wrap` },
|
|
20
|
-
React.createElement(AccountButton, { text: item.product.name, btnType: `green-large-text`, className: `ordered-item-title`,
|
|
19
|
+
React.createElement(AccountButton, { text: item.product.name, btnType: `green-large-text`, className: `ordered-item-title`, onClick: () => handleProductClick(item.product) }),
|
|
21
20
|
item.color ? (React.createElement("div", { className: `right-first-item-wrap` },
|
|
22
21
|
React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color1`, text: `color` }),
|
|
23
22
|
"\u00A0",
|
|
@@ -40,7 +39,7 @@ const OrderedItems = ({ data: items, status }) => {
|
|
|
40
39
|
React.createElement("div", { className: `mobile-image-wrap` },
|
|
41
40
|
React.createElement(Image, { src: item.product.image.src, alt: item.product.image.alt })),
|
|
42
41
|
React.createElement("div", { className: `mobile-info-wrap` },
|
|
43
|
-
React.createElement(AccountButton, { text: item.product.name, btnType: `green-large-text`,
|
|
42
|
+
React.createElement(AccountButton, { text: item.product.name, btnType: `green-large-text`, className: `ordered-item-mobile-title`, onClick: () => handleProductClick(item.product) }),
|
|
44
43
|
item.color ? (React.createElement("div", { className: `mobile-info-item` },
|
|
45
44
|
React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color1`, text: `color` }),
|
|
46
45
|
"\u00A0",
|
|
@@ -62,7 +61,7 @@ const OrderedItems = ({ data: items, status }) => {
|
|
|
62
61
|
React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color1 mb-mt`, text: `total` }),
|
|
63
62
|
React.createElement(Text, { className: `account-p account-p3 account-font-bold account-primary-color1`, text: handlePriceCheckFunc(item.total, currency) })))))))
|
|
64
63
|
: null;
|
|
65
|
-
}, [items, currency, winWidth, status]);
|
|
64
|
+
}, [items, currency, winWidth, status, handleProductClick]);
|
|
66
65
|
return (React.createElement(OrderedItemsStyle, { className: `ordered-items-wrapper` },
|
|
67
66
|
React.createElement(Text, { className: 'account-p account-p1 account-font-bold account-primary-color1 ', text: 'orderItems' }),
|
|
68
67
|
React.createElement("div", { className: 'line' }),
|