refactor(checkout): update checkout navigation logic to retain purchase state

This commit is contained in:
2026-08-20 13:53:52 -03:00
parent 92546a28c0
commit d0b1607ff4
3 changed files with 11 additions and 25 deletions

View File

@@ -187,8 +187,8 @@ export class StoreLayoutComponent implements OnInit {
protected async onLogoutClick(): Promise<void> {
const isLeavingCheckout = this.router.url.startsWith('/checkout');
// Checkout must be left while the authenticated session is still valid so
// its CanDeactivate guard can cancel the pending purchase.
// Leave checkout before closing the authenticated session so its component
// can stop payment polling cleanly. The checkout itself remains pending.
if (isLeavingCheckout) {
const navigationSucceeded = await this.router.navigate(['/']);