From 83c600737b99255eb57a531430f7996f12a60a8d Mon Sep 17 00:00:00 2001 From: alangsto <46360176+alangsto@users.noreply.github.com> Date: Tue, 5 Dec 2023 11:47:36 -0500 Subject: [PATCH] feat: remove segment event (#1250) --- src/courseware/course/chat/Chat.jsx | 10 ---------- src/courseware/course/chat/Chat.test.jsx | 2 -- 2 files changed, 12 deletions(-) diff --git a/src/courseware/course/chat/Chat.jsx b/src/courseware/course/chat/Chat.jsx index 63eedc4402..59585a60b7 100644 --- a/src/courseware/course/chat/Chat.jsx +++ b/src/courseware/course/chat/Chat.jsx @@ -4,8 +4,6 @@ import PropTypes from 'prop-types'; import { Xpert } from '@edx/frontend-lib-learning-assistant'; import { injectIntl } from '@edx/frontend-platform/i18n'; -import { sendTrackEvent } from '@edx/frontend-platform/analytics'; - const Chat = ({ enabled, enrollmentMode, @@ -42,14 +40,6 @@ const Chat = ({ && (isEnrolled || isStaff) // display only to enrolled or staff ); - // TODO: Remove this Segment alert. This has been added purely to diagnose whether - // usage issues are as a result of the Xpert toggle button not appearing. - if (shouldDisplayChat) { - sendTrackEvent('edx.ui.lms.learning_assistant.render', { - course_id: courseId, - }); - } - return ( <> {/* Use a portal to ensure that component overlay does not compete with learning MFE styles. */} diff --git a/src/courseware/course/chat/Chat.test.jsx b/src/courseware/course/chat/Chat.test.jsx index 2e6b26b0c8..930318bfe7 100644 --- a/src/courseware/course/chat/Chat.test.jsx +++ b/src/courseware/course/chat/Chat.test.jsx @@ -8,8 +8,6 @@ import { initializeMockApp, render, screen } from '../../../setupTest'; import Chat from './Chat'; -jest.mock('@edx/frontend-platform/analytics'); - initializeMockApp(); const courseId = 'course-v1:edX+DemoX+Demo_Course';