Skip to content
Snippets Groups Projects
Commit 24ef7271 authored by Barnando Akbarto Hidayatullah's avatar Barnando Akbarto Hidayatullah
Browse files

fix: [MP-1352] add missing tracking element in

parent 4b024cf3
Branches fix/MP-1352-event-messaging-function
Tags
No related merge requests found
......@@ -15,6 +15,8 @@ import { onChatError } from "@/core/Chat/effector/errors";
import { onSetModeHide } from "@/core/Chat/effector/mode";
import { setPresenceOnlineFx } from "@/core/Chat/effector/presense";
import { DropdownView as ChatDropdownView } from "@/features/private/chat-new/components/DropdownView";
import { dataLayerUserClickMessageButton } from "@/lib/dataLayersPush";
import formatFullName from "@/lib/formatters/fio";
import { ButtonIcon as OldButtonIcon } from "@/ui/components";
import styles from "./styles.module.scss";
......@@ -34,6 +36,10 @@ export const ChatActions = () => {
const handleClick = useCallback(() => {
if (!isOpen) {
dataLayerUserClickMessageButton({
user_id: auth?.id as string,
user_name: formatFullName(auth?.details),
});
void setPresenceOnlineFx();
}
......@@ -46,7 +52,7 @@ export const ChatActions = () => {
if (chatInitialized !== ChatInitializedStore.DONE) {
onChatError("Chats are temporary unavailable");
}
}, [chatInitialized, isOpen, mode]);
}, [auth?.details, auth?.id, chatInitialized, isOpen, mode]);
if (auth?.id == null || chatInitialized !== ChatInitializedStore.DONE) {
return null;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment