diff --git a/src/features/auth/login/ui/form.tsx b/src/features/auth/login/ui/form.tsx
index 67d567a..c7becde 100644
--- a/src/features/auth/login/ui/form.tsx
+++ b/src/features/auth/login/ui/form.tsx
@@ -9,8 +9,7 @@ import {
import PhonePrefix from '../../../../shared/ui/phonePrefix';
import { MotionWrapper } from '../../../../shared/ui/motion';
import { useLoginForm } from '../lib/useLoginForm';
-import { useLoginModal } from '@/shared/zustand/auth';
-import Link from 'next/link';
+import { useLoginModal, useRegisterModal } from '@/shared/zustand/auth';
import { useTranslations } from 'next-intl';
export function LoginForm() {
@@ -20,6 +19,9 @@ export function LoginForm() {
const { phone, setPhone, submit, error, loading } = useLoginForm();
const toggleLoginModal = useLoginModal((state) => state.toggleLoginModal);
+ const toggleRegisterModal = useRegisterModal(
+ (state) => state.toggleRegisterModal,
+ );
const handlePhoneChange = useCallback(
(e: React.ChangeEvent
+
{t('registerPrompt')}
- {
+ toggleLoginModal();
+ toggleRegisterModal();
+ }}
+ className="text-stone-800 hover:cursor-pointer underline underline-offset-2 hover:text-stone-600 transition-colors"
>
{t('registerLink')}
-
+
+ {t('loginPrompt')} +
{ + toggleLoginModal(); + toggleRegisterModal(); + }} + className="text-stone-800 hover:cursor-pointer underline underline-offset-2 hover:text-stone-600 transition-colors" + > + {t_login('title')} +
+ ); } diff --git a/src/shared/config/i18n/messages/en.json b/src/shared/config/i18n/messages/en.json index 86f1d54..3ed7a48 100644 --- a/src/shared/config/i18n/messages/en.json +++ b/src/shared/config/i18n/messages/en.json @@ -188,7 +188,8 @@ "namePlaceholder": "Ali", "surnamePlaceholder": "Karimov", "terms": "I agree to the Terms of Service and Privacy Policy", - "submitButton": "Create account" + "submitButton": "Create account", + "loginPrompt": "Already have an account?" } }, "Payment": { diff --git a/src/shared/config/i18n/messages/ru.json b/src/shared/config/i18n/messages/ru.json index ee3c5ce..5073b39 100644 --- a/src/shared/config/i18n/messages/ru.json +++ b/src/shared/config/i18n/messages/ru.json @@ -188,7 +188,8 @@ "namePlaceholder": "Али", "surnamePlaceholder": "Каримов", "terms": "Я согласен с Условиями обслуживания и Политикой конфиденциальности", - "submitButton": "Создать аккаунт" + "submitButton": "Создать аккаунт", + "loginPrompt": "Уже есть аккаунт?" } }, "Payment": { diff --git a/src/shared/config/i18n/messages/uz.d.json.ts b/src/shared/config/i18n/messages/uz.d.json.ts index 709d3f1..95a0d10 100644 --- a/src/shared/config/i18n/messages/uz.d.json.ts +++ b/src/shared/config/i18n/messages/uz.d.json.ts @@ -192,6 +192,7 @@ declare const messages: { surnamePlaceholder: 'Karimov'; terms: "Men Xizmat ko'rsatish shartlari va Maxfiylik siyosatiga roziman"; submitButton: 'Hisob yaratish'; + loginPrompt: 'Hisobingiz bormi?'; }; }; Payment: { diff --git a/src/shared/config/i18n/messages/uz.json b/src/shared/config/i18n/messages/uz.json index bf1078e..7b2462d 100644 --- a/src/shared/config/i18n/messages/uz.json +++ b/src/shared/config/i18n/messages/uz.json @@ -188,7 +188,8 @@ "namePlaceholder": "Ali", "surnamePlaceholder": "Karimov", "terms": "Men Xizmat ko'rsatish shartlari va Maxfiylik siyosatiga roziman", - "submitButton": "Hisob yaratish" + "submitButton": "Hisob yaratish", + "loginPrompt": "Hisobingiz bormi?" } }, "Payment": { diff --git a/src/widgets/home/components/Hero.tsx b/src/widgets/home/components/Hero.tsx index 612be62..31ad2d1 100644 --- a/src/widgets/home/components/Hero.tsx +++ b/src/widgets/home/components/Hero.tsx @@ -1,5 +1,10 @@ -import type { FC } from 'react'; -import { motion, type MotionStyle, type MotionValue } from 'framer-motion'; +'use client'; +import { + motion, + useScroll, + useTransform, + type MotionStyle, +} from 'framer-motion'; import { fadeUp, stagger } from '../animations'; import { C } from '../tokens'; import { STATS } from '../constants'; @@ -10,16 +15,15 @@ import Section from './Section'; import Stat from './Stat'; import StartButton from './StartButton'; import { useTranslations } from 'next-intl'; +import { useLoginModal } from '@/shared/zustand/auth'; -interface HeroProps { - onStart: () => void; - blobY: MotionValue