Skip to content

Voice-to-text dictation app with local (Nvidia Parakeet/Whisper) and cloud models (BYOK). Privacy-first and available cross-platform.

fix(pricing): wire standalone upgrade button through checkoutTier

Gabriel Stein58fae00db8ec
diff --git a/src/components/SettingsPage.tsx b/src/components/SettingsPage.tsx
index ef0d75237..50ae005c5 100644
--- a/src/components/SettingsPage.tsx
+++ b/src/components/SettingsPage.tsx
@@ -2092,26 +2092,14 @@ export default function SettingsPage({
</Button>
) : (
<Button
- onClick={async () => {
- const result = await usage.openCheckout({
- plan: billingState.pro ? "annual" : "monthly",
- tier: "pro",
- });
- if (!result.success) {
- toast({
- title: t("settingsPage.account.checkout.couldNotOpenTitle"),
- description: t(
- "settingsPage.account.checkout.couldNotOpenDescription"
- ),
- variant: "destructive",
- });
- }
- }}
+ onClick={() =>
+ handleCheckout(billingState.pro ? "annual" : "monthly", "pro")
+ }
size="sm"
className="w-full"
- disabled={usage.checkoutLoading}
+ disabled={!!checkoutTier}
>
- {usage.checkoutLoading
+ {checkoutTier === "pro"
? t("settingsPage.account.checkout.opening")
: t("settingsPage.account.checkout.upgradeToPro")}
</Button>