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): give standalone upgrade button its own checkoutTier key

Gabriel Steinf7327e2002b2
diff --git a/src/components/SettingsPage.tsx b/src/components/SettingsPage.tsx
index 30c54c311..ba2af2460 100644
--- a/src/components/SettingsPage.tsx
+++ b/src/components/SettingsPage.tsx
@@ -2093,10 +2093,12 @@ export default function SettingsPage({
) : (
<Button
onClick={async () => {
+ setCheckoutTier("plan-upgrade");
const result = await usage.openCheckout({
plan: billingState.pro ? "annual" : "monthly",
tier: "pro",
});
+ setCheckoutTier(null);
if (!result.success) {
toast({
title: t("settingsPage.account.checkout.couldNotOpenTitle"),
@@ -2109,9 +2111,9 @@ export default function SettingsPage({
}}
size="sm"
className="w-full"
- disabled={usage.checkoutLoading}
+ disabled={checkoutTier === "plan-upgrade"}
>
- {usage.checkoutLoading
+ {checkoutTier === "plan-upgrade"
? t("settingsPage.account.checkout.opening")
: t("settingsPage.account.checkout.upgradeToPro")}
</Button>