Skip to content

Commit

Permalink
Allow multiple trials
Browse files Browse the repository at this point in the history
  • Loading branch information
ajayyy committed Dec 30, 2023
1 parent 048ebc2 commit ab75889
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/help/PaymentComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@ export const PaymentComponent = () => {
const [redeemEnabled, setRedeemEnabled] = React.useState(false);

const iframeSource = React.useRef(`${websiteDomain}/payment#${objectToURI("", {
hideFreeTrial: Config.config!.freeTrialStart !== null || Config.config!.freeTrialEnded,
hideFreeTrial: Config.config!.freeTrialStart !== null && !Config.config!.freeTrialEnded,
hideRequestFreeAccessButton: Config.config!.freeAccessRequestStart !== null,
hideRedeem: true
}, false)}`);

const applyChoices = async (choices: PaymentComponentChoices) => {
if (Config.config!.freeTrialStart) {
// Can't have two trials
if (Config.config!.freeTrialStart && !Config.config!.freeTrialEnded) {
// Can't have two trials at once
choices.freeTrial = false;
}

Expand Down

0 comments on commit ab75889

Please sign in to comment.