diff --git a/packages/evershop/src/components/common/ProductNoThumbnail.jsx b/packages/evershop/src/components/common/ProductNoThumbnail.jsx
index 86aefacdb..bd226d70c 100644
--- a/packages/evershop/src/components/common/ProductNoThumbnail.jsx
+++ b/packages/evershop/src/components/common/ProductNoThumbnail.jsx
@@ -1,26 +1,39 @@
import React from 'react';
+import PropTypes from 'prop-types';
-const ProductNoThumbnail = ({ width, height }) => (
-
-);
+function ProductNoThumbnail({ width, height }) {
+ return (
+
+ );
+}
+
+ProductNoThumbnail.propTypes = {
+ width: PropTypes.number,
+ height: PropTypes.number
+};
+
+ProductNoThumbnail.defaultProps = {
+ width: 100,
+ height: 100
+};
export default ProductNoThumbnail;
diff --git a/packages/evershop/src/components/frontStore/checkout/cart/items/Items.jsx b/packages/evershop/src/components/frontStore/checkout/cart/items/Items.jsx
index 69baea54d..129b7528d 100644
--- a/packages/evershop/src/components/frontStore/checkout/cart/items/Items.jsx
+++ b/packages/evershop/src/components/frontStore/checkout/cart/items/Items.jsx
@@ -3,10 +3,10 @@ import React from 'react';
import { toast } from 'react-toastify';
import { useAppDispatch } from '@components/common/context/app';
import { _ } from '@evershop/evershop/src/lib/locale/translate';
+import ProductNoThumbnail from '@components/common/ProductNoThumbnail';
import { ItemOptions } from './ItemOptions';
import { ItemVariantOptions } from './ItemVariantOptions';
import './Items.scss';
-import ProductNoThumbnail from '@components/common/ProductNoThumbnail';
function Items({ items, setting: { displayCheckoutPriceIncludeTax } }) {
const AppContextDispatch = useAppDispatch();
diff --git a/packages/evershop/src/components/frontStore/checkout/checkout/summary/Items.jsx b/packages/evershop/src/components/frontStore/checkout/checkout/summary/Items.jsx
index 95e7efaed..6d77e5456 100644
--- a/packages/evershop/src/components/frontStore/checkout/checkout/summary/Items.jsx
+++ b/packages/evershop/src/components/frontStore/checkout/checkout/summary/Items.jsx
@@ -51,7 +51,7 @@ function Items({ items, displayCheckoutPriceIncludeTax }) {
)}
{!item.thumbnail && (
-
+
)}
{item.qty}
diff --git a/packages/evershop/src/components/frontStore/checkout/success/summary/items/Items.jsx b/packages/evershop/src/components/frontStore/checkout/success/summary/items/Items.jsx
index 24458c7f4..6e713ef11 100644
--- a/packages/evershop/src/components/frontStore/checkout/success/summary/items/Items.jsx
+++ b/packages/evershop/src/components/frontStore/checkout/success/summary/items/Items.jsx
@@ -19,7 +19,7 @@ function Items({ items, displayCheckoutPriceIncludeTax }) {
)}
{!item.thumbnail && (
-
+
)}
{item.qty}
diff --git a/packages/evershop/src/modules/catalog/graphql/types/Product/Image/ProductImage.resolvers.js b/packages/evershop/src/modules/catalog/graphql/types/Product/Image/ProductImage.resolvers.js
index a2dc8a010..ed5693d5a 100644
--- a/packages/evershop/src/modules/catalog/graphql/types/Product/Image/ProductImage.resolvers.js
+++ b/packages/evershop/src/modules/catalog/graphql/types/Product/Image/ProductImage.resolvers.js
@@ -3,7 +3,6 @@ const path = require('path');
const { select } = require('@evershop/postgres-query-builder');
const uniqid = require('uniqid');
const { CONSTANTS } = require('@evershop/evershop/src/lib/helpers');
-const { getConfig } = require('@evershop/evershop/src/lib/util/getConfig');
function getUrls(image) {
const thumbVersion = image.replace(/.([^.]*)$/, '-thumb.$1');
diff --git a/packages/evershop/src/modules/checkout/api/getShippingMethods/sendMethods.js b/packages/evershop/src/modules/checkout/api/getShippingMethods/sendMethods.js
index cd3dacb57..e46623ff1 100644
--- a/packages/evershop/src/modules/checkout/api/getShippingMethods/sendMethods.js
+++ b/packages/evershop/src/modules/checkout/api/getShippingMethods/sendMethods.js
@@ -7,9 +7,6 @@ const {
} = require('@evershop/evershop/src/lib/util/httpStatus');
const { default: axios } = require('axios');
const { select } = require('@evershop/postgres-query-builder');
-const {
- translate
-} = require('@evershop/evershop/src/lib/locale/translate/translate');
const { toPrice } = require('../../services/toPrice');
// eslint-disable-next-line no-unused-vars
diff --git a/packages/evershop/src/modules/checkout/services/cart/Item.js b/packages/evershop/src/modules/checkout/services/cart/Item.js
index 6a5c09323..92533001e 100644
--- a/packages/evershop/src/modules/checkout/services/cart/Item.js
+++ b/packages/evershop/src/modules/checkout/services/cart/Item.js
@@ -1,4 +1,3 @@
-const config = require('config');
const { select } = require('@evershop/postgres-query-builder');
const fs = require('fs');
const path = require('path');
@@ -123,13 +122,9 @@ module.exports.Item = class Item extends DataObject {
);
return fs.existsSync(path.join(CONSTANTS.MEDIAPATH, thumb))
? `/assets${thumb}`
- : `/assets/theme/frontStore${config.get(
- 'catalog.product.image.placeHolder'
- )}`;
+ : null;
} else {
- return `/assets/theme/frontStore${config.get(
- 'catalog.product.image.placeHolder'
- )}`;
+ return null;
}
}
],
diff --git a/packages/evershop/src/modules/oms/pages/admin/dashboard/Statistic.jsx b/packages/evershop/src/modules/oms/pages/admin/dashboard/Statistic.jsx
index c181497ab..b3eb6c09b 100644
--- a/packages/evershop/src/modules/oms/pages/admin/dashboard/Statistic.jsx
+++ b/packages/evershop/src/modules/oms/pages/admin/dashboard/Statistic.jsx
@@ -1,5 +1,5 @@
import PropTypes from 'prop-types';
-import { XAxis, YAxis, Tooltip, AreaChart, Area } from 'recharts';
+import { XAxis, YAxis, Tooltip, ResponsiveContainer, AreaChart, Area } from 'recharts';
import React, { useState, useEffect } from 'react';
import { toast } from 'react-toastify';
import { Card } from '@components/admin/cms/Card';
@@ -58,36 +58,35 @@ export default function SaleStatistic({ api }) {
>
{data.length === 0 ? null : (
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
)}
diff --git a/packages/evershop/src/modules/paypal/api/paypalCreateOrder/[bodyParser]createOrder.js b/packages/evershop/src/modules/paypal/api/paypalCreateOrder/[bodyParser]createOrder.js
index feb6c83aa..278470fa3 100644
--- a/packages/evershop/src/modules/paypal/api/paypalCreateOrder/[bodyParser]createOrder.js
+++ b/packages/evershop/src/modules/paypal/api/paypalCreateOrder/[bodyParser]createOrder.js
@@ -107,7 +107,7 @@ module.exports = async (request, response, stack, next) => {
address.admin_area_1 = shippingAddress.province.split('-').pop();
}
orderData.purchase_units[0].shipping = {
- address: address
+ address
};
} else {
// This is digital order, no shipping address
@@ -141,7 +141,7 @@ module.exports = async (request, response, stack, next) => {
address.admin_area_1 = billingAddress.province.split('-').pop();
}
orderData.purchase_units[0].billing = {
- address: address
+ address
};
}
// Call PayPal API to create order using axios