trial choice

This commit is contained in:
dev.daminik00 2025-10-23 02:51:26 +02:00
parent 5ae4f1d6fa
commit c87b115bb5
2 changed files with 10 additions and 6 deletions

View File

@ -54,7 +54,11 @@ export function TrialChoiceTemplate(props: TrialChoiceTemplateProps) {
const trialOptionsRef = useRef<HTMLDivElement | null>(null);
// Получаем email из answers воронки
const email = typeof answers.email === 'string' ? answers.email : 'user@example.com';
// Email хранится как массив строк под ключом с ID email экрана
// Сначала ищем email экран по template, затем берем его ID
const emailScreen = funnel.screens.find(s => s.template === 'email');
const emailScreenId = emailScreen?.id || 'email'; // fallback на 'email' для обратной совместимости
const email = answers[emailScreenId]?.[0] || 'user@example.com';
// Map variant -> TrialOption items with server-provided English titles and accent (last as fallback)
const items = useMemo(() => {

View File

@ -13,9 +13,9 @@ export function ProfileCreated({ email }: ProfileCreatedProps) {
const avatarLetter = email.charAt(0).toUpperCase();
return (
<div className="inline-flex items-center gap-5 rounded-2xl border-2 border-blue-200 bg-gradient-to-r from-blue-50 to-indigo-50 p-[18px]">
<div className="flex items-center gap-5 rounded-2xl border-2 border-blue-200 bg-gradient-to-r from-blue-50 to-indigo-50 p-[18px] w-full">
{/* Profile section with avatar and email */}
<div className="flex items-center gap-3">
<div className="flex items-center gap-3 flex-1 min-w-0">
{/* Avatar with first letter */}
<div className="flex h-12 w-12 items-center justify-center rounded-full bg-gradient-to-br from-blue-500 to-blue-900 shadow-[0_2px_4px_0_rgba(0,0,0,0.1),0_4px_6px_0_rgba(0,0,0,0.1)]">
<span className="text-center font-inter text-xl font-bold leading-7 text-white">
@ -24,11 +24,11 @@ export function ProfileCreated({ email }: ProfileCreatedProps) {
</div>
{/* Email and success message */}
<div className="flex flex-col items-start justify-center">
<p className="font-inter text-lg font-semibold leading-7 text-[#333333]">
<div className="flex flex-col items-start justify-center min-w-0 flex-1">
<p className="font-inter text-lg font-semibold leading-7 text-[#333333] truncate w-full">
{email}
</p>
<p className="font-inter text-sm font-medium leading-5 text-blue-600">
<p className="font-inter text-sm font-medium leading-5 text-blue-600 whitespace-nowrap">
Profile created successfully
</p>
</div>