From f790a95e7158b776b49235e014d6f494438c9405 Mon Sep 17 00:00:00 2001 From: smanylov Date: Wed, 14 Jan 2026 13:26:18 +0700 Subject: [PATCH] edit yandex button behavior --- src/app/components/YandexLogin.tsx | 21 ++++++++++++++------- src/app/styles/pages-styles.scss | 4 ++++ 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/src/app/components/YandexLogin.tsx b/src/app/components/YandexLogin.tsx index a1cd6ac..1dc7fd0 100644 --- a/src/app/components/YandexLogin.tsx +++ b/src/app/components/YandexLogin.tsx @@ -12,6 +12,7 @@ declare global { export default function YandexAuthWithScript() { const buttonRef = useRef(null); const [isReady, setIsReady] = useState(false); + const [showButton, setShowButton] = useState(true); const handleLogin = (token: string) => { console.log('handleLogin'); @@ -41,6 +42,10 @@ export default function YandexAuthWithScript() { console.log(result); if (result?.access_token) { handleLogin(result.access_token); + } else { + setTimeout(() => { + setShowButton(false); + }, 1000) } }) .catch((error: any) => { @@ -57,13 +62,15 @@ export default function YandexAuthWithScript() { onError={() => console.error('Failed to load Yandex script')} /> -
- {!isReady &&
Загрузка Яндекс авторизации...
} -
+ {showButton && ( +
+ {!isReady &&
Загрузка Яндекс авторизации...
} +
+ )} ); } \ No newline at end of file diff --git a/src/app/styles/pages-styles.scss b/src/app/styles/pages-styles.scss index 5139311..b32f128 100644 --- a/src/app/styles/pages-styles.scss +++ b/src/app/styles/pages-styles.scss @@ -1823,4 +1823,8 @@ .swiper-slide { width: 100% !important; } +} + +.yaPreloadingSuggestBlockContainer { + height: 52px !important; } \ No newline at end of file