diff --git a/public/funnels/soulmate.json b/public/funnels/soulmate.json index 96af8ca..9046fcd 100644 --- a/public/funnels/soulmate.json +++ b/public/funnels/soulmate.json @@ -170,7 +170,7 @@ }, "navigation": { "rules": [], - "defaultNextScreenId": "relationship-status", + "defaultNextScreenId": "analysis-target", "isEndScreen": false }, "list": { @@ -269,6 +269,15 @@ "align": "left", "color": "default" }, + "subtitle": { + "text": "This helps make the portrait and insights more accurate.", + "show": true, + "font": "manrope", + "weight": "regular", + "size": "md", + "align": "center", + "color": "default" + }, "bottomActionButton": { "show": false, "cornerRadius": "3xl", @@ -2195,7 +2204,7 @@ { "conditions": [ { - "screenId": "gender", + "screenId": "partner-gender", "operator": "includesAny", "optionIds": [ "male" @@ -2339,7 +2348,7 @@ }, "icon": "lock" }, - "buttonText": "Get Me Soulmate Sketch" + "buttonText": "Get My Soulmate Sketch" }, "joinedToday": { "count": { @@ -2351,7 +2360,7 @@ }, "trustedByOver": { "text": { - "text": "Trusted by over 355,000 people." + "text": "Trusted by over **355,000 people." } }, "findingOneGuide": { @@ -2364,7 +2373,7 @@ } }, "text": { - "text": "You're not just looking for someone — you're. You're not just looking for someone — you'reYou're not just looking for someone — you'reYou're not just looking for someone — you'reYou're not just looking for someone — you're. You're not just looking for someone — you're. You're not just looking for someone — you'reYou're not just looking for someone — you'reYou're not just looking for someone — you'reYou're not just looking for someone — you're" + "text": "You’re special — you have imagination and energy that not everyone can understand. You deserve more than to be “half-understood” — you deserve to meet someone who sees the world as deeply and vividly as you do. This guide will help you recognize the signs of destiny, trust your path, and find the one whose heart is already connected to yours." }, "blur": { "text": { @@ -2473,7 +2482,7 @@ "src": "/trial-payment/users-portraits/6.jpg" } ], - "buttonText": "Get me soulmate sketch" + "buttonText": "Get My Soulmate Sketch" }, "joinedTodayWithAvatars": { "count": { @@ -2642,7 +2651,7 @@ "title": { "text": "Still have questions? We're here to help!" }, - "actionButtonText": "Get me Soulmate Sketch", + "actionButtonText": "Get My Soulmate Sketch", "contactButtonText": "Contact Support" }, "commonQuestions": { @@ -2677,8 +2686,8 @@ "text": "CONTACTS" }, "email": { - "href": "support@witlab.com", - "text": "support@witlab.com" + "href": "info@witlab.us", + "text": "info@witlab.us" }, "address": { "text": "Wit Lab 2108 N ST STE N SACRAMENTO, CA95816, US" @@ -2690,15 +2699,15 @@ }, "links": [ { - "href": "https://witlab.us", + "href": "https://witlab.com/terms", "text": "Terms of Service" }, { - "href": "https://witlab.us", + "href": "https://witlab.com/privacy", "text": "Privacy Policy" }, { - "href": "https://witlab.us", + "href": "https://witlab.com/refund", "text": "Refund Policy" } ], diff --git a/src/components/domains/TrialPayment/Contacts/Contacts.tsx b/src/components/domains/TrialPayment/Contacts/Contacts.tsx index 3142941..7367bb3 100644 --- a/src/components/domains/TrialPayment/Contacts/Contacts.tsx +++ b/src/components/domains/TrialPayment/Contacts/Contacts.tsx @@ -56,7 +56,13 @@ export default function Contacts({ email.className )} > - {email.children} + + {email.children} + )} diff --git a/src/components/domains/TrialPayment/Legal/Legal.tsx b/src/components/domains/TrialPayment/Legal/Legal.tsx index 3247bca..d21ba58 100644 --- a/src/components/domains/TrialPayment/Legal/Legal.tsx +++ b/src/components/domains/TrialPayment/Legal/Legal.tsx @@ -45,7 +45,7 @@ export default function Legal({ link.className )} > - {link.children} + {link.children} ))} diff --git a/src/components/domains/TrialPayment/Policy/Policy.tsx b/src/components/domains/TrialPayment/Policy/Policy.tsx index d23815c..216cbcf 100644 --- a/src/components/domains/TrialPayment/Policy/Policy.tsx +++ b/src/components/domains/TrialPayment/Policy/Policy.tsx @@ -3,14 +3,26 @@ import Typography, { } from "@/components/ui/Typography/Typography"; import { cn } from "@/lib/utils"; -interface PolicyProps extends React.ComponentProps<"div"> { +interface PolicyProps extends Omit, "children"> { text?: TypographyProps<"p">; + children?: React.ReactNode; // Support custom content with links } -export default function Policy({ text, ...props }: PolicyProps) { +export default function Policy({ text, children, ...props }: PolicyProps) { return (
- {text && ( + {children ? ( + // Custom content (e.g., with links) + + {children} + + ) : text ? ( + // Legacy text prop support - )} + ) : null}
); } diff --git a/src/components/funnel/templates/CouponTemplate/CouponTemplate.tsx b/src/components/funnel/templates/CouponTemplate/CouponTemplate.tsx index 89470b4..42275f2 100644 --- a/src/components/funnel/templates/CouponTemplate/CouponTemplate.tsx +++ b/src/components/funnel/templates/CouponTemplate/CouponTemplate.tsx @@ -1,6 +1,6 @@ "use client"; -import { useState } from "react"; +import { useState, useRef, useEffect } from "react"; import { Coupon } from "@/components/widgets/Coupon/Coupon"; import Typography from "@/components/ui/Typography/Typography"; @@ -9,6 +9,7 @@ import { buildTypographyProps } from "@/lib/funnel/mappers"; import type { CouponScreenDefinition, DefaultTexts } from "@/lib/funnel/types"; import { TemplateLayout } from "../layouts/TemplateLayout"; import { createTemplateLayoutProps } from "@/lib/funnel/templateHelpers"; +import { cn } from "@/lib/utils"; interface CouponTemplateProps { screen: CouponScreenDefinition; @@ -28,15 +29,38 @@ export function CouponTemplate({ defaultTexts, }: CouponTemplateProps) { const [copiedCode, setCopiedCode] = useState(null); + const [isVisible, setIsVisible] = useState(false); + const [animationKey, setAnimationKey] = useState(0); + const fadeTimeoutRef = useRef(null); + const removeTimeoutRef = useRef(null); + // Cleanup timeouts on unmount + useEffect(() => { + return () => { + if (fadeTimeoutRef.current) clearTimeout(fadeTimeoutRef.current); + if (removeTimeoutRef.current) clearTimeout(removeTimeoutRef.current); + }; + }, []); const handleCopyPromoCode = (code: string) => { + // Clear existing timeouts + if (fadeTimeoutRef.current) clearTimeout(fadeTimeoutRef.current); + if (removeTimeoutRef.current) clearTimeout(removeTimeoutRef.current); + navigator.clipboard.writeText(code); setCopiedCode(code); + setIsVisible(true); + setAnimationKey(prev => prev + 1); // Force animation restart - setTimeout(() => { + // Start fade out animation before removing + fadeTimeoutRef.current = setTimeout(() => { + setIsVisible(false); + }, 2500); + + // Remove from DOM after animation completes + removeTimeoutRef.current = setTimeout(() => { setCopiedCode(null); - }, 2000); + }, 3000); }; const couponProps = { @@ -118,26 +142,40 @@ export function CouponTemplate({ return (
-
+
+ {/* Copied message positioned above coupon in available space */} + {copiedCode && ( +
+ + {screen.copiedMessage + ? screen.copiedMessage.replace("{code}", copiedCode || "") + : `Промокод "${copiedCode}" скопирован!` + } + +
+ )} +
- - {copiedCode && ( -
- - {screen.copiedMessage - ? screen.copiedMessage.replace("{code}", copiedCode || "") - : `Промокод "${copiedCode}" скопирован!` - } - -
- )}
); diff --git a/src/components/funnel/templates/TrialPaymentTemplate/TrialPaymentTemplate.stories.tsx b/src/components/funnel/templates/TrialPaymentTemplate/TrialPaymentTemplate.stories.tsx index 70bb325..1146c38 100644 --- a/src/components/funnel/templates/TrialPaymentTemplate/TrialPaymentTemplate.stories.tsx +++ b/src/components/funnel/templates/TrialPaymentTemplate/TrialPaymentTemplate.stories.tsx @@ -206,15 +206,15 @@ const defaultScreen: TrialPaymentScreenDefinition = { title: { text: "WIT LAB ©" }, contacts: { title: { text: "CONTACTS" }, - email: { href: "support@witlab.com", text: "support@witlab.com" }, + email: { href: "https://witlab.us", text: "Contact" }, address: { text: "Wit Lab 2108 N ST STE N SACRAMENTO, CA95816, US" }, }, legal: { title: { text: "LEGAL" }, links: [ - { href: "https://witlab.us", text: "Terms of Service" }, - { href: "https://witlab.us", text: "Privacy Policy" }, - { href: "https://witlab.us", text: "Refund Policy" }, + { href: "https://witlab.us/terms", text: "Terms of Service" }, + { href: "https://witlab.us/privacy", text: "Privacy Policy" }, + { href: "https://witlab.us/refund", text: "Refund Policy" }, ], copyright: { text: diff --git a/src/components/funnel/templates/TrialPaymentTemplate/TrialPaymentTemplate.tsx b/src/components/funnel/templates/TrialPaymentTemplate/TrialPaymentTemplate.tsx index f01bdbf..b074cb6 100644 --- a/src/components/funnel/templates/TrialPaymentTemplate/TrialPaymentTemplate.tsx +++ b/src/components/funnel/templates/TrialPaymentTemplate/TrialPaymentTemplate.tsx @@ -128,7 +128,7 @@ export function TrialPaymentTemplate({ if (paymentSectionRef.current) { paymentSectionRef.current.scrollIntoView({ behavior: "smooth", - block: "start", + block: "end", // Policy text at bottom of screen }); } }; @@ -285,7 +285,7 @@ export function TrialPaymentTemplate({ initialSeconds: screen.headerBlock.timerSeconds ?? 600, }} button={{ - children: defaultTexts?.continueButton || "Continue", + children: "Get Sketch", onClick: scrollToPayment, }} /> @@ -575,7 +575,7 @@ export function TrialPaymentTemplate({ )} {screen.paymentButtons && ( -
+
{ @@ -684,18 +684,29 @@ export function TrialPaymentTemplate({ )} {screen.policy && ( - +
+ + By clicking Continue, you agree to our{" "} + + Terms of Use & Service + {" "} + and{" "} + + Privacy Policy + + . You also acknowledge that your 1-week introductory plan to Wit Lab LLC, billed at $1.00, will automatically renew at $14.99 every 1 week unless canceled before the end of the trial period. + +
)} {screen.usersPortraits && ( @@ -947,7 +958,13 @@ export function TrialPaymentTemplate({ screen.stillHaveQuestions.contactButtonText ? { children: screen.stillHaveQuestions.contactButtonText, - onClick: scrollToPayment, + onClick: () => { + // Open contact link from footer config + const contactUrl = screen.footer?.contacts?.email?.href; + if (contactUrl) { + window.open(contactUrl, "_blank", "noopener,noreferrer"); + } + }, } : undefined } diff --git a/src/components/funnel/templates/layouts/TemplateLayout.tsx b/src/components/funnel/templates/layouts/TemplateLayout.tsx index bc6ef46..db8205f 100644 --- a/src/components/funnel/templates/layouts/TemplateLayout.tsx +++ b/src/components/funnel/templates/layouts/TemplateLayout.tsx @@ -135,11 +135,11 @@ export function TemplateLayout({ diff --git a/src/components/templates/Email/Email.stories.tsx b/src/components/templates/Email/Email.stories.tsx index 4882130..366fd9c 100644 --- a/src/components/templates/Email/Email.stories.tsx +++ b/src/components/templates/Email/Email.stories.tsx @@ -53,11 +53,11 @@ const meta: Meta = { privacyTermsConsentProps: { privacyPolicy: { children: "Privacy Policy", - href: "https://witlab.us", + href: "https://witlab.us/privacy", }, termsOfUse: { children: "Terms of use", - href: "https://witlab.us", + href: "https://witlab.us/terms", }, }, privacySecurityBannerProps: { diff --git a/src/components/templates/SoulmatePortrait/SoulmatePortrait.stories.tsx b/src/components/templates/SoulmatePortrait/SoulmatePortrait.stories.tsx index 921bc78..3eeab42 100644 --- a/src/components/templates/SoulmatePortrait/SoulmatePortrait.stories.tsx +++ b/src/components/templates/SoulmatePortrait/SoulmatePortrait.stories.tsx @@ -21,11 +21,11 @@ const meta: Meta = { privacyTermsConsentProps: { privacyPolicy: { children: "Privacy Policy", - href: "https://witlab.us", + href: "https://witlab.us/privacy", }, termsOfUse: { children: "Terms of use", - href: "https://witlab.us", + href: "https://witlab.us/terms", }, }, title: { diff --git a/src/components/templates/TrialPayment/TrialPayment.stories.tsx b/src/components/templates/TrialPayment/TrialPayment.stories.tsx index e5cbb61..d6be006 100644 --- a/src/components/templates/TrialPayment/TrialPayment.stories.tsx +++ b/src/components/templates/TrialPayment/TrialPayment.stories.tsx @@ -718,8 +718,8 @@ const meta: Meta = { children: "CONTACTS", }, email: { - href: "support@witlab.com", - children: "support@witlab.com", + href: "https://witlab.us", + children: "Contact", }, address: { children: "Wit Lab 2108 N ST STE N SACRAMENTO, CA95816, US", @@ -730,9 +730,9 @@ const meta: Meta = { children: "LEGAL", }, links: [ - { href: "https://witlab.us", children: "Terms of Service" }, - { href: "https://witlab.us", children: "Privacy Policy" }, - { href: "https://witlab.us", children: "Refund Policy" }, + { href: "https://witlab.us/terms", children: "Terms of Service" }, + { href: "https://witlab.us/privacy", children: "Privacy Policy" }, + { href: "https://witlab.us/refund", children: "Refund Policy" }, ], copyright: { children: diff --git a/src/components/widgets/PrivacyTermsConsent/PrivacyTermsConsent.tsx b/src/components/widgets/PrivacyTermsConsent/PrivacyTermsConsent.tsx index b8ccc7e..7e4b9cb 100644 --- a/src/components/widgets/PrivacyTermsConsent/PrivacyTermsConsent.tsx +++ b/src/components/widgets/PrivacyTermsConsent/PrivacyTermsConsent.tsx @@ -27,13 +27,13 @@ export default function PrivacyTermsConsent({ I agree to the{" "} {privacyPolicy && ( )} {", "} {termsOfUse && ( )}{" "} and to the use of cookies and tracking technologies, that require your diff --git a/src/lib/admin/builder/state/defaults/trialPayment.ts b/src/lib/admin/builder/state/defaults/trialPayment.ts index 3231c0d..263ae05 100644 --- a/src/lib/admin/builder/state/defaults/trialPayment.ts +++ b/src/lib/admin/builder/state/defaults/trialPayment.ts @@ -175,15 +175,15 @@ export function buildTrialPaymentDefaults(id?: string): TrialPaymentScreenDefini title: { text: "WIT LAB ©" }, contacts: { title: { text: "CONTACTS" }, - email: { href: "support@witlab.com", text: "support@witlab.com" }, + email: { href: "https://witlab.us", text: "Contact" }, address: { text: "Wit Lab 2108 N ST STE N SACRAMENTO, CA95816, US" }, }, legal: { title: { text: "LEGAL" }, links: [ - { href: "https://witlab.com/terms", text: "Terms of Service" }, - { href: "https://witlab.com/privacy", text: "Privacy Policy" }, - { href: "https://witlab.com/refund", text: "Refund Policy" }, + { href: "https://witlab.us/terms", text: "Terms of Service" }, + { href: "https://witlab.us/privacy", text: "Privacy Policy" }, + { href: "https://witlab.us/refund", text: "Refund Policy" }, ], copyright: { text: diff --git a/src/lib/funnel/bakedFunnels.ts b/src/lib/funnel/bakedFunnels.ts index dae9d72..2b7ed25 100644 --- a/src/lib/funnel/bakedFunnels.ts +++ b/src/lib/funnel/bakedFunnels.ts @@ -178,7 +178,7 @@ export const BAKED_FUNNELS: Record = { }, "navigation": { "rules": [], - "defaultNextScreenId": "relationship-status", + "defaultNextScreenId": "analysis-target", "isEndScreen": false }, "list": { @@ -277,6 +277,15 @@ export const BAKED_FUNNELS: Record = { "align": "left", "color": "default" }, + "subtitle": { + "text": "This helps make the portrait and insights more accurate.", + "show": true, + "font": "manrope", + "weight": "regular", + "size": "md", + "align": "center", + "color": "default" + }, "bottomActionButton": { "show": false, "cornerRadius": "3xl", @@ -2203,7 +2212,7 @@ export const BAKED_FUNNELS: Record = { { "conditions": [ { - "screenId": "gender", + "screenId": "partner-gender", "operator": "includesAny", "optionIds": [ "male" @@ -2347,7 +2356,7 @@ export const BAKED_FUNNELS: Record = { }, "icon": "lock" }, - "buttonText": "Get Me Soulmate Sketch" + "buttonText": "Get My Soulmate Sketch" }, "joinedToday": { "count": { @@ -2359,7 +2368,7 @@ export const BAKED_FUNNELS: Record = { }, "trustedByOver": { "text": { - "text": "Trusted by over 355,000 people." + "text": "Trusted by over **355,000 people." } }, "findingOneGuide": { @@ -2372,7 +2381,7 @@ export const BAKED_FUNNELS: Record = { } }, "text": { - "text": "You're not just looking for someone — you're. You're not just looking for someone — you'reYou're not just looking for someone — you'reYou're not just looking for someone — you'reYou're not just looking for someone — you're. You're not just looking for someone — you're. You're not just looking for someone — you'reYou're not just looking for someone — you'reYou're not just looking for someone — you'reYou're not just looking for someone — you're" + "text": "You’re special — you have imagination and energy that not everyone can understand. You deserve more than to be “half-understood” — you deserve to meet someone who sees the world as deeply and vividly as you do. This guide will help you recognize the signs of destiny, trust your path, and find the one whose heart is already connected to yours." }, "blur": { "text": { @@ -2481,7 +2490,7 @@ export const BAKED_FUNNELS: Record = { "src": "/trial-payment/users-portraits/6.jpg" } ], - "buttonText": "Get me soulmate sketch" + "buttonText": "Get My Soulmate Sketch" }, "joinedTodayWithAvatars": { "count": { @@ -2650,7 +2659,7 @@ export const BAKED_FUNNELS: Record = { "title": { "text": "Still have questions? We're here to help!" }, - "actionButtonText": "Get me Soulmate Sketch", + "actionButtonText": "Get My Soulmate Sketch", "contactButtonText": "Contact Support" }, "commonQuestions": { @@ -2685,8 +2694,8 @@ export const BAKED_FUNNELS: Record = { "text": "CONTACTS" }, "email": { - "href": "support@witlab.com", - "text": "support@witlab.com" + "href": "info@witlab.us", + "text": "info@witlab.us" }, "address": { "text": "Wit Lab 2108 N ST STE N SACRAMENTO, CA95816, US" @@ -2698,15 +2707,15 @@ export const BAKED_FUNNELS: Record = { }, "links": [ { - "href": "https://witlab.us", + "href": "https://witlab.com/terms", "text": "Terms of Service" }, { - "href": "https://witlab.us", + "href": "https://witlab.com/privacy", "text": "Privacy Policy" }, { - "href": "https://witlab.us", + "href": "https://witlab.com/refund", "text": "Refund Policy" } ],