fix: fix styles for chat buttons
This commit is contained in:
parent
2da77f7347
commit
eff29677dc
|
@ -51,11 +51,13 @@ export const ExpertCard: FC<ExpertDetailsProps> = ({ expert, locale, expertId })
|
||||||
}
|
}
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const handleJoinChat = (id: number) => {
|
const handleJoinChat = (id?: number) => {
|
||||||
|
if (id) {
|
||||||
joinChatPerson(id).then((res: any) => {
|
joinChatPerson(id).then((res: any) => {
|
||||||
router.push(`/account/messages/${res.id}` as string);
|
router.push(`/account/messages/${res.id}` as string);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const checkSession = (data?: SignupSessionData) => {
|
const checkSession = (data?: SignupSessionData) => {
|
||||||
if (data?.startAtUtc && data?.tagId) {
|
if (data?.startAtUtc && data?.tagId) {
|
||||||
|
@ -106,11 +108,13 @@ export const ExpertCard: FC<ExpertDetailsProps> = ({ expert, locale, expertId })
|
||||||
<Button className="btn-apply" onClick={() => handleJoinChat(id)}>
|
<Button className="btn-apply" onClick={() => handleJoinChat(id)}>
|
||||||
{i18nText('chat.join', locale)}
|
{i18nText('chat.join', locale)}
|
||||||
</Button>
|
</Button>
|
||||||
{botUserId && (
|
<Button
|
||||||
<Button className="btn-apply" onClick={() => handleJoinChat(botUserId)}>
|
className={`btn-apply${!botUserId ? ' btn-disabled' : ''}`}
|
||||||
|
disabled={!botUserId}
|
||||||
|
onClick={botUserId ? () => handleJoinChat(botUserId) : undefined}
|
||||||
|
>
|
||||||
{i18nText('chat.joinAI', locale)}
|
{i18nText('chat.joinAI', locale)}
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
|
||||||
{/*
|
{/*
|
||||||
<a href="#" className="btn-video">
|
<a href="#" className="btn-video">
|
||||||
<img src="/images/videocam-outline.svg" className="" alt=""/>
|
<img src="/images/videocam-outline.svg" className="" alt=""/>
|
||||||
|
|
|
@ -563,6 +563,10 @@ a {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.btn-disabled {
|
||||||
|
opacity: .4 !important;
|
||||||
|
}
|
||||||
|
|
||||||
.btn-back {
|
.btn-back {
|
||||||
user-select: none;
|
user-select: none;
|
||||||
outline: none;
|
outline: none;
|
||||||
|
|
Loading…
Reference in New Issue