-
-
Notifications
You must be signed in to change notification settings - Fork 232
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #740 from tone-row/dev
v1.57.4
- Loading branch information
Showing
8 changed files
with
59 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import { t } from "@lingui/macro"; | ||
import { usePostHog } from "posthog-js/react"; | ||
import { useCallback } from "react"; | ||
|
||
type Variant = | ||
| "unlimited-yearly" | ||
| "join-creators" | ||
| "boost-productivity" | ||
| "anytime-yearly" | ||
| "users-love" | ||
| "unlock-unlimited"; | ||
|
||
/** | ||
* Returns the copy for the button on the AI paywall modal | ||
*/ | ||
export function useGetAIPaywallCopy() { | ||
const posthog = usePostHog(); | ||
return useCallback(() => { | ||
const variant = posthog.featureFlags.getFeatureFlag( | ||
"ai-paywall-copy-conversion" | ||
) as Variant; | ||
|
||
switch (variant) { | ||
case "unlimited-yearly": | ||
return t`Unlimited AI Flowcharts: $2/mo (billed yearly)`; | ||
case "join-creators": | ||
return t`Join 5,000+ AI Flowchart Creators. $4/mo`; | ||
case "boost-productivity": | ||
return t`Unlimited AI Flowcharts - Boost Productivity Now`; | ||
case "anytime-yearly": | ||
return t`AI Flowcharts Anytime - $2/mo (billed yearly)`; | ||
case "users-love": | ||
return t`5,000+ Users Love AI Flowcharts - Join Now`; | ||
case "unlock-unlimited": | ||
return t`Unlock Unlimited AI Flowcharts`; | ||
} | ||
}, [posthog.featureFlags]); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.