Stop Paystack pre-modal flash on customer checkout.
Deploy Ladill Mini / deploy (push) Successful in 1m39s

Use the shared Inline sheet, hold busy until payment UI opens, and avoid locking page scroll during the handoff.
This commit is contained in:
isaacclad
2026-07-24 10:14:41 +00:00
parent fa82e8e906
commit 5edbf0a677
5 changed files with 318 additions and 961 deletions
+5 -1
View File
@@ -323,7 +323,11 @@ Alpine.data('miniPaymentLanding', (config = {}) => ({
: 'Network error. Please try again.';
} finally {
clearTimeout(timer);
this.loading = false;
// Keep loading while the sheet is open — ladill-pay-opened / cancel / error clear it.
// Clearing here caused a form flash before Paystack's modal painted.
if (!this.showSheet) {
this.loading = false;
}
}
},
}));
@@ -59,8 +59,7 @@
this.accessCode = data.access_code || '';
this.publicKey = data.public_key || '';
this.returnUrl = data.callback_url || '';
this.showSheet = true;
this.loading = false;
this.showSheet = true; // loading cleared when payment UI opens (ladill-pay-opened)
} catch (error) {
window.LadillPayCheckout?.cancel?.(); this.errorMsg = 'Network error. Please try again.';
this.loading = false;
File diff suppressed because it is too large Load Diff
+3 -6
View File
@@ -374,8 +374,7 @@
this.accessCode = data.access_code || '';
this.publicKey = data.public_key || '';
this.returnUrl = data.callback_url || '';
this.showSheet = true;
this.loading = false;
this.showSheet = true; // loading cleared when payment UI opens (ladill-pay-opened)
}
} catch(e) {
window.LadillPayCheckout?.cancel?.(); this.errorMsg = 'Network error. Please try again.';
@@ -695,8 +694,7 @@
this.accessCode = data.access_code || '';
this.publicKey = data.public_key || '';
this.returnUrl = data.callback_url || '';
this.showSheet = true;
this.loading = false;
this.showSheet = true; // loading cleared when payment UI opens (ladill-pay-opened)
}
} catch(e) { window.LadillPayCheckout?.cancel?.(); this.errorMsg = 'Network error. Please try again.'; this.loading = false; }
}
@@ -1246,8 +1244,7 @@
this.accessCode = data.access_code || '';
this.publicKey = data.public_key || '';
this.returnUrl = data.callback_url || '';
this.showSheet = true;
this.loading = false;
this.showSheet = true; // loading cleared when payment UI opens (ladill-pay-opened)
}
} catch(e) {
window.LadillPayCheckout?.cancel?.(); this.errorMsg = 'Network error. Please try again.';