mirror of
https://github.com/formbricks/formbricks.git
synced 2026-05-19 03:04:39 -05:00
chore: tweak
This commit is contained in:
+7
-4
@@ -8,17 +8,20 @@ interface SelectPlanOnboardingProps {
|
||||
variant?: TPlanVariant;
|
||||
}
|
||||
|
||||
export const SelectPlanOnboarding = async ({ organizationId, variant = "a" }: SelectPlanOnboardingProps) => {
|
||||
export const SelectPlanOnboarding = async ({
|
||||
organizationId,
|
||||
variant = "control",
|
||||
}: SelectPlanOnboardingProps) => {
|
||||
const t = await getTranslate();
|
||||
const nextUrl = `/organizations/${organizationId}/workspaces/new/mode`;
|
||||
|
||||
const isVariantB = variant === "b";
|
||||
const isGiftedPro = variant === "gifted_pro";
|
||||
|
||||
const headerTitle = isVariantB
|
||||
const headerTitle = isGiftedPro
|
||||
? t("workspace.settings.billing.select_plan_variant_b_header_title")
|
||||
: t("workspace.settings.billing.select_plan_header_title");
|
||||
|
||||
const headerSubtitle = isVariantB
|
||||
const headerSubtitle = isGiftedPro
|
||||
? t("workspace.settings.billing.select_plan_variant_b_header_subtitle")
|
||||
: t("workspace.settings.billing.select_plan_header_subtitle");
|
||||
|
||||
|
||||
+1
-1
@@ -40,7 +40,7 @@ const Page = async (props: PlanPageProps) => {
|
||||
return redirect(`/organizations/${params.organizationId}/workspaces/new/mode`);
|
||||
}
|
||||
|
||||
let variant: TPlanVariant = "a";
|
||||
let variant: TPlanVariant = "control";
|
||||
const flagValue = await getPostHogFeatureFlag(session.user.id, "reverse_trial_experiment", {
|
||||
organizationId: params.organizationId,
|
||||
});
|
||||
|
||||
@@ -29,20 +29,20 @@ const CUSTOMER_LOGOS = [
|
||||
{ src: ethereumLogo, alt: "Ethereum" },
|
||||
];
|
||||
|
||||
export const SelectPlanCard = ({ nextUrl, organizationId, variant = "a" }: SelectPlanCardProps) => {
|
||||
export const SelectPlanCard = ({ nextUrl, organizationId, variant = "control" }: SelectPlanCardProps) => {
|
||||
const router = useRouter();
|
||||
const [isStartingTrial, setIsStartingTrial] = useState(false);
|
||||
const [isStartingHobby, setIsStartingHobby] = useState(false);
|
||||
const { t } = useTranslation();
|
||||
const isVariantB = variant === "b";
|
||||
const isGiftedPro = variant === "gifted_pro";
|
||||
|
||||
const title = isVariantB
|
||||
const title = isGiftedPro
|
||||
? t("workspace.settings.billing.select_plan_variant_b_title")
|
||||
: t("workspace.settings.billing.trial_title");
|
||||
|
||||
const subtitle = isVariantB ? null : t("workspace.settings.billing.trial_no_credit_card");
|
||||
const subtitle = isGiftedPro ? null : t("workspace.settings.billing.trial_no_credit_card");
|
||||
|
||||
const cta = isVariantB
|
||||
const cta = isGiftedPro
|
||||
? t("workspace.settings.billing.select_plan_variant_b_cta")
|
||||
: t("common.start_free_trial");
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import { PLAN_VARIANTS, type TPlanVariant } from "./select-plan-variants";
|
||||
|
||||
describe("PLAN_VARIANTS", () => {
|
||||
test("contains exactly the expected variants", () => {
|
||||
expect(PLAN_VARIANTS).toEqual(["a", "b"]);
|
||||
expect(PLAN_VARIANTS).toEqual(["control", "gifted_pro"]);
|
||||
});
|
||||
|
||||
test("TPlanVariant covers all entries", () => {
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
export const PLAN_VARIANTS = ["a", "b"] as const;
|
||||
export const PLAN_VARIANTS = ["control", "gifted_pro"] as const;
|
||||
|
||||
export type TPlanVariant = (typeof PLAN_VARIANTS)[number];
|
||||
|
||||
Reference in New Issue
Block a user