Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

web: show resubscribe button if subscription is canceled

Abdullah Atta5cf9c4808efb
diff --git a/apps/web/src/dialogs/settings/components/subscription-status.tsx b/apps/web/src/dialogs/settings/components/subscription-status.tsx
index d101d9477..4d1994593 100644
--- a/apps/web/src/dialogs/settings/components/subscription-status.tsx
+++ b/apps/web/src/dialogs/settings/components/subscription-status.tsx
@@ -196,40 +196,27 @@ export function SubscriptionStatus() {
Request a refund
</Button>
</>
- ) : isBasic ? (
- <>
- <Button
- variant="accent"
- onClick={async () => {
- showBuyDialog();
- }}
- >
- Upgrade to Pro
- </Button>
- <Button
- variant="secondary"
- onClick={activateTrial}
- sx={{ bg: "background" }}
- >
- {isActivatingTrial ? (
- <Loading size={16} />
- ) : (
- "Try free for 14 days"
- )}
- </Button>
- </>
- ) : isTrial ? (
+ ) : null}
+ {!isPro && (
<>
- <Button
- variant="accent"
- onClick={async () => {
- showBuyDialog();
- }}
- >
- Upgrade to Pro
+ <Button variant="accent" onClick={() => showBuyDialog()}>
+ {isProCancelled ? "Resubscribe" : "Upgrade to Pro"}
</Button>
+ {isBasic && (
+ <Button
+ variant="secondary"
+ onClick={activateTrial}
+ sx={{ bg: "background" }}
+ >
+ {isActivatingTrial ? (
+ <Loading size={16} />
+ ) : (
+ "Try free for 14 days"
+ )}
+ </Button>
+ )}
</>
- ) : null}
+ )}
</Flex>
</Flex>
{isBasic ? <Features /> : null}