diff --git a/apps/mobile/src/app/account/subscription.tsx b/apps/mobile/src/app/account/subscription.tsx index 1588a9a..ff33ee5 100644 --- a/apps/mobile/src/app/account/subscription.tsx +++ b/apps/mobile/src/app/account/subscription.tsx @@ -1,6 +1,7 @@ import { useCallback, useEffect, useState } from "react"; import { router } from "expo-router"; import { ActivityIndicator, Alert, Pressable, ScrollView, Text, View } from "react-native"; +import { useSafeAreaInsets } from "react-native-safe-area-context"; import { Ionicons } from "@expo/vector-icons"; import type { CustomerInfo, PurchasesOffering, PurchasesPackage } from "react-native-purchases"; import Purchases from "react-native-purchases"; @@ -8,6 +9,7 @@ import { getActiveRestaurant } from "@/lib/active-restaurant"; import { configurePurchases, getCurrentOffering, getCustomerInfo, isProActive, PRO_ENTITLEMENT_ID } from "@/lib/purchases"; export default function SubscriptionScreen() { + const insets = useSafeAreaInsets(); const [loading, setLoading] = useState(true); const [offering, setOffering] = useState(null); const [customerInfo, setCustomerInfo] = useState(null); @@ -83,9 +85,16 @@ export default function SubscriptionScreen() { } return ( - + - router.back()} style={{ padding: 4 }}> + (router.canGoBack() ? router.back() : router.replace("/account"))} + hitSlop={12} + style={{ padding: 8 }} + > Abonelik