From fd5d4e56ea3714ca01a50e4a8a87dda2af063bc7 Mon Sep 17 00:00:00 2001 From: Ammar Ahmed Date: Sat, 23 Aug 2025 14:55:43 +0500 Subject: [PATCH] mobile: route to login page from paywall --- .../mobile/app/components/premium/paywall.tsx | 22 +++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/apps/mobile/app/components/premium/paywall.tsx b/apps/mobile/app/components/premium/paywall.tsx index 84f0ff436..fd5b17972 100644 --- a/apps/mobile/app/components/premium/paywall.tsx +++ b/apps/mobile/app/components/premium/paywall.tsx @@ -64,7 +64,8 @@ import { TECHLORE_SVG, XDA_SVG } from "../../assets/images/assets"; -import { EV, EVENTS, SubscriptionPlan, User } from "@notesnook/core"; +import { EV, EVENTS, Plan, SubscriptionPlan, User } from "@notesnook/core"; +import { AuthMode } from "../auth/common"; const Steps = { select: 1, @@ -305,7 +306,24 @@ const PayWall = (props: NavigationProps<"PayWall">) => { { + if (!pricingPlans.user) { + Navigation.navigate("Auth", { + mode: AuthMode.login, + state: { + planId: pricingPlans.currentPlan?.id, + productId: + ( + pricingPlans.selectedProduct as RNIap.Subscription + )?.productId || + (pricingPlans.selectedProduct as Plan).period, + billingType: annualBilling ? "annual" : "monthly" + } + }); + return; + } + setStep(step); + }} pricingPlans={pricingPlans} annualBilling={annualBilling} />