Fixed change plan bug

This commit is contained in:
Peter Zimon 2021-08-18 16:28:49 +02:00
parent e4e68f4526
commit 3210f5d346
2 changed files with 2 additions and 2 deletions

View File

@ -19,7 +19,7 @@ const DEV_MODE_DATA = {
showPopup: true,
site: Fixtures.site,
member: Fixtures.member.paid,
page: 'signup'
page: 'accountHome'
};
function SentryErrorBoundary({site, children}) {

View File

@ -708,7 +708,7 @@ function ProductPriceSwitch({products, selectedInterval, setSelectedInterval}) {
let yearlyDiscount = 0;
if (selectedProduct !== 'free') {
if (products && selectedProduct !== 'free') {
const product = products.find(prod => prod.id === selectedProduct);
yearlyDiscount = calculateDiscount(product.monthlyPrice.amount, product.yearlyPrice.amount);
}