Skip to content

⚡️⚡️⚡️ Self-hosted collaborative bookmark manager to collect, read, annotate, and fully preserve what matters, all in one place.

fix(mobile): update subscription button

daniel31x13cd292f0b4d67
diff --git a/apps/mobile/app/subscribe.tsx b/apps/mobile/app/subscribe.tsx
index 93ba6018..1e218ed0 100644
--- a/apps/mobile/app/subscribe.tsx
+++ b/apps/mobile/app/subscribe.tsx
@@ -27,8 +27,6 @@ import {
Search,
Sparkles,
} from "lucide-react-native";
-import FontAwesome5 from "@expo/vector-icons/FontAwesome5";
-import { useFonts } from "expo-font";
import * as DropdownMenu from "zeego/dropdown-menu";
import {
ErrorCode,
@@ -70,18 +68,15 @@ const paymentButton = Platform.select({
accessibilityLabel: "Subscribe with Apple Pay",
icon: "apple-pay",
iconSize: 40,
- label: "Subscribe",
},
android: {
accessibilityLabel: "Subscribe with Google Pay",
icon: "google-pay",
iconSize: 40,
- label: "Subscribe",
},
default: {
accessibilityLabel: "Complete Subscription",
iconSize: 0,
- label: "Complete Subscription",
},
});
@@ -91,8 +86,6 @@ export default function SubscribeScreen() {
const theme = rawTheme[colorScheme as ThemeName];
const accentColor = colorScheme === "dark" ? "#A78BFA" : theme.accent;
const insets = useSafeAreaInsets();
- const payButtonClass = colorScheme === "dark" ? "bg-white" : "bg-black";
- const payContentColor = colorScheme === "dark" ? "#000000" : "#FFFFFF";
const [plan, setPlan] = useState<Plan>(Plan.yearly);
const {
data: user,
@@ -104,7 +97,6 @@ export default function SubscribeScreen() {
const [restoreLoading, setRestoreLoading] = useState(false);
const [productsError, setProductsError] = useState(false);
const [fetchAttempt, setFetchAttempt] = useState(0);
- const [payIconReady] = useFonts(FontAwesome5.font);
const [introOfferEligible, setIntroOfferEligible] = useState(
Platform.OS !== "ios"
@@ -324,8 +316,8 @@ export default function SubscribeScreen() {
option: option ?? null,
footnote: total
? freeTrialPeriod
- ? `Get ${freeTrialPeriod} free, then ${total} per ${period}. Cancel anytime from your device settings.`
- : `${total} per ${period}. Cancel anytime from your device settings.`
+ ? `${freeTrialPeriod} free, then ${total}/${period}`
+ : `${total}/${period}`
: null,
};
}, [plan, monthlyPlan, yearlyPlan, introOfferEligible]);
@@ -574,36 +566,25 @@ export default function SubscribeScreen() {
) : null}
<Button
- variant="ghost"
+ variant="accent"
size="lg"
activeOpacity={0.85}
accessibilityRole="button"
accessibilityLabel={paymentButton.accessibilityLabel}
- className={`w-full flex-row mt-4 px-4 ${payButtonClass}`}
+ className={`w-full h-16 mt-4 flex-col gap-0`}
disabled={!selectedPlan.option || purchaseLoading || !user?.uuid}
onPress={purchase}
isLoading={purchaseLoading}
>
- {paymentButton.icon && payIconReady ? (
- <FontAwesome5
- brand
- name={paymentButton.icon}
- size={paymentButton.iconSize}
- color={payContentColor}
- />
- ) : (
- <Text
- className="text-xl font-semibold"
- style={{ color: payContentColor }}
- >
- {paymentButton.label}
- </Text>
- )}
+ <Text className="text-xl font-semibold text-white">
+ Start Free Trial
+ </Text>
+ <Text className="text-white">{selectedPlan.footnote}</Text>
</Button>
{selectedPlan.footnote ? (
<Text className="text-neutral text-center text-xs mt-3">
- {selectedPlan.footnote}
+ Cancel anytime from your device settings.
</Text>
) : null}