From eff29677dc046fa19c886aa7d1d23070deef9a08 Mon Sep 17 00:00:00 2001 From: SD Date: Sun, 29 Dec 2024 14:43:29 +0400 Subject: [PATCH] fix: fix styles for chat buttons --- src/components/Experts/ExpertDetails.tsx | 22 +++++++++++++--------- src/styles/_default.scss | 4 ++++ 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/src/components/Experts/ExpertDetails.tsx b/src/components/Experts/ExpertDetails.tsx index d75aa8f..0cec8e2 100644 --- a/src/components/Experts/ExpertDetails.tsx +++ b/src/components/Experts/ExpertDetails.tsx @@ -51,10 +51,12 @@ export const ExpertCard: FC = ({ expert, locale, expertId }) } }, []); - const handleJoinChat = (id: number) => { - joinChatPerson(id).then((res: any) => { - router.push(`/account/messages/${res.id}` as string); - }) + const handleJoinChat = (id?: number) => { + if (id) { + joinChatPerson(id).then((res: any) => { + router.push(`/account/messages/${res.id}` as string); + }) + } } const checkSession = (data?: SignupSessionData) => { @@ -106,11 +108,13 @@ export const ExpertCard: FC = ({ expert, locale, expertId }) - {botUserId && ( - - )} + {/* diff --git a/src/styles/_default.scss b/src/styles/_default.scss index 01dcb18..2bf12b6 100644 --- a/src/styles/_default.scss +++ b/src/styles/_default.scss @@ -563,6 +563,10 @@ a { } } +.btn-disabled { + opacity: .4 !important; +} + .btn-back { user-select: none; outline: none;