Compare commits
No commits in common. "fac840a348a88a3fc244b5f6afa19c7f0b8e0d4f" and "d6b2a37dde7982c3aef260b74f53d072b928dcef" have entirely different histories.
fac840a348
...
d6b2a37dde
29
src/App.tsx
29
src/App.tsx
|
|
@ -114,10 +114,6 @@ export default function App() {
|
||||||
} else {
|
} else {
|
||||||
switchTab('subscriptions');
|
switchTab('subscriptions');
|
||||||
setVerificationResult(null);
|
setVerificationResult(null);
|
||||||
setCart([]);
|
|
||||||
setAppliedCoupon(null);
|
|
||||||
setCouponCode('');
|
|
||||||
setPricingCalc(null);
|
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -345,8 +341,6 @@ export default function App() {
|
||||||
setLoggedInUser(null);
|
setLoggedInUser(null);
|
||||||
setCart([]);
|
setCart([]);
|
||||||
setAppliedCoupon(null);
|
setAppliedCoupon(null);
|
||||||
setCouponCode('');
|
|
||||||
setPricingCalc(null);
|
|
||||||
switchTab('storefront');
|
switchTab('storefront');
|
||||||
setShowProfileDrawer(false);
|
setShowProfileDrawer(false);
|
||||||
setProfileDisplayName('');
|
setProfileDisplayName('');
|
||||||
|
|
@ -695,13 +689,7 @@ export default function App() {
|
||||||
|
|
||||||
const exists = cart.find(item => item.code === module.code);
|
const exists = cart.find(item => item.code === module.code);
|
||||||
if (exists) {
|
if (exists) {
|
||||||
const nextCart = cart.filter(item => item.code !== module.code);
|
setCart(cart.filter(item => item.code !== module.code));
|
||||||
setCart(nextCart);
|
|
||||||
if (nextCart.length === 0) {
|
|
||||||
setAppliedCoupon(null);
|
|
||||||
setCouponCode('');
|
|
||||||
setPricingCalc(null);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
if (module.code === 'LIFETIME_ALL') {
|
if (module.code === 'LIFETIME_ALL') {
|
||||||
setCart([dynamicModule]);
|
setCart([dynamicModule]);
|
||||||
|
|
@ -773,11 +761,6 @@ export default function App() {
|
||||||
const filteredCart = cart.filter(item => !isModuleUnlocked(item.code));
|
const filteredCart = cart.filter(item => !isModuleUnlocked(item.code));
|
||||||
if (filteredCart.length !== cart.length) {
|
if (filteredCart.length !== cart.length) {
|
||||||
setCart(filteredCart);
|
setCart(filteredCart);
|
||||||
if (filteredCart.length === 0) {
|
|
||||||
setAppliedCoupon(null);
|
|
||||||
setCouponCode('');
|
|
||||||
setPricingCalc(null);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, [loggedInUser, cart]);
|
}, [loggedInUser, cart]);
|
||||||
|
|
@ -928,8 +911,6 @@ export default function App() {
|
||||||
|
|
||||||
setCart([]);
|
setCart([]);
|
||||||
setAppliedCoupon(null);
|
setAppliedCoupon(null);
|
||||||
setCouponCode('');
|
|
||||||
setPricingCalc(null);
|
|
||||||
await fetchUserProfile(userToken);
|
await fetchUserProfile(userToken);
|
||||||
} catch (err: any) {
|
} catch (err: any) {
|
||||||
setVerificationResult({
|
setVerificationResult({
|
||||||
|
|
@ -1125,13 +1106,7 @@ export default function App() {
|
||||||
{verificationResult && verificationResult.status === 'success' && (
|
{verificationResult && verificationResult.status === 'success' && (
|
||||||
<PaymentSuccessModal
|
<PaymentSuccessModal
|
||||||
verificationResult={verificationResult}
|
verificationResult={verificationResult}
|
||||||
onClose={() => {
|
onClose={() => setVerificationResult(null)}
|
||||||
setVerificationResult(null);
|
|
||||||
setCart([]);
|
|
||||||
setAppliedCoupon(null);
|
|
||||||
setCouponCode('');
|
|
||||||
setPricingCalc(null);
|
|
||||||
}}
|
|
||||||
loggedInUser={loggedInUser}
|
loggedInUser={loggedInUser}
|
||||||
onDownloadInvoice={handleDownloadCheckoutInvoice}
|
onDownloadInvoice={handleDownloadCheckoutInvoice}
|
||||||
downloadingInvoice={downloadingModalInvoice}
|
downloadingInvoice={downloadingModalInvoice}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue