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