@jetshop/template-trend 5.12.3 → 5.12.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/.vscode/launch.json +11 -0
- package/package.json +5 -5
- package/src/components/CategoryPage/ProductGrid.js +2 -0
- package/src/components/Forms/Success.js +1 -1
- package/src/components/MyPages/ChangePasswordPage.js +1 -0
- package/src/components/ProductPage/ProductPage.js +6 -2
- package/src/shop.config.js +2 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jetshop/template-trend",
|
|
3
|
-
"version": "5.12.
|
|
3
|
+
"version": "5.12.4",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "react-scripts build",
|
|
@@ -45,11 +45,11 @@
|
|
|
45
45
|
]
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@jetshop/core": "^5.12.
|
|
48
|
+
"@jetshop/core": "^5.12.4",
|
|
49
49
|
"@jetshop/flight-shortcodes": "^2.0.10",
|
|
50
|
-
"@jetshop/intl": "^5.12.
|
|
51
|
-
"@jetshop/react-scripts": "^5.12.
|
|
52
|
-
"@jetshop/ui": "^5.12.
|
|
50
|
+
"@jetshop/intl": "^5.12.4",
|
|
51
|
+
"@jetshop/react-scripts": "^5.12.4",
|
|
52
|
+
"@jetshop/ui": "^5.12.4",
|
|
53
53
|
"@react-google-maps/api": "~1.7.0",
|
|
54
54
|
"prop-types": "^15.6.2",
|
|
55
55
|
"react": "^16.9.0",
|
|
@@ -61,6 +61,7 @@ export function ProductGrid({
|
|
|
61
61
|
category = '',
|
|
62
62
|
loading,
|
|
63
63
|
className,
|
|
64
|
+
categoryPath,
|
|
64
65
|
...rest
|
|
65
66
|
}) {
|
|
66
67
|
const track = useTracker();
|
|
@@ -86,6 +87,7 @@ export function ProductGrid({
|
|
|
86
87
|
product={product}
|
|
87
88
|
style={{ opacity: loading ? 0.5 : 1 }}
|
|
88
89
|
list={listName}
|
|
90
|
+
categoryPath={categoryPath}
|
|
89
91
|
loadImageEagerly={isAboveFold(index)}
|
|
90
92
|
{...rest}
|
|
91
93
|
>
|
|
@@ -120,7 +120,7 @@ const ProductContainer = styled('div')`
|
|
|
120
120
|
}
|
|
121
121
|
`;
|
|
122
122
|
|
|
123
|
-
const Product = ({ result: { data, loading }, product }) => {
|
|
123
|
+
const Product = ({ result: { data, loading }, product, partialProduct }) => {
|
|
124
124
|
const initialVariant = useVariantFromUrl();
|
|
125
125
|
const t = useIntl();
|
|
126
126
|
|
|
@@ -132,13 +132,17 @@ const Product = ({ result: { data, loading }, product }) => {
|
|
|
132
132
|
const { selectedVariant: selectedVariation, getMissingOptions } =
|
|
133
133
|
variantHandler;
|
|
134
134
|
|
|
135
|
+
if (!product) {
|
|
136
|
+
product = partialProduct;
|
|
137
|
+
}
|
|
135
138
|
// Return early if there is no product
|
|
136
|
-
if (!product)
|
|
139
|
+
if (!product) {
|
|
137
140
|
return (
|
|
138
141
|
<ProductContainer>
|
|
139
142
|
<ProductPageLoadingState />
|
|
140
143
|
</ProductContainer>
|
|
141
144
|
);
|
|
145
|
+
}
|
|
142
146
|
|
|
143
147
|
const images = product.images ?? [];
|
|
144
148
|
const parents = getParentOrCanonicalRoute(data?.route?.parents, product);
|