mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-12-01 00:43:15 +00:00
fix(native): retain the selected storefront offer during account checks
This commit is contained in:
@@ -1009,7 +1009,10 @@ function showPlans(opts: { back?: boolean } = {}): void {
|
||||
|
||||
choose.addEventListener('click', async () => {
|
||||
const plan = selected();
|
||||
if (!plan || !offerFor(offer, plan, interval).buyable) return;
|
||||
if (!plan) return;
|
||||
const selectedInterval = interval;
|
||||
const price = offerFor(offer, plan, selectedInterval);
|
||||
if (!price.buyable) return;
|
||||
void tap(ImpactStyle.Medium);
|
||||
// A store account with a running subscription buys nothing more: say so before the form.
|
||||
choose.disabled = true;
|
||||
@@ -1019,7 +1022,7 @@ function showPlans(opts: { back?: boolean } = {}): void {
|
||||
showSubscribed();
|
||||
return;
|
||||
}
|
||||
showClaim(plan, interval, offerFor(offer, plan, interval).label);
|
||||
showClaim(plan, selectedInterval, price.label);
|
||||
});
|
||||
|
||||
const load = async () => {
|
||||
|
||||
Reference in New Issue
Block a user