Skip to content

Commit

Permalink
More free trial fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ajayyy committed Mar 16, 2024
1 parent b81571d commit 59dad68
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/help/PaymentComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export const PaymentComponent = () => {
}, false)}`);

const applyChoices = async (choices: PaymentComponentChoices) => {
if (freeTrialActive()) {
if (Config.config!.freeTrialStart && !Config.config!.freeTrialEnded) {
// Can't have two trials at once
choices.freeTrial = false;
}
Expand Down Expand Up @@ -79,6 +79,7 @@ export const PaymentComponent = () => {
} else if (choices.freeTrial) {
setPaymentResult(PaymentResultMessageType.FreeTrial)
Config.config!.freeTrialStart = Date.now();
Config.config!.freeTrialEnded = false;
}

window.scrollTo(0, 0);
Expand Down

0 comments on commit 59dad68

Please sign in to comment.