Skip to content

Commit

Permalink
feat: remove segment event (openedx#1250)
Browse files Browse the repository at this point in the history
  • Loading branch information
alangsto committed Dec 5, 2023
1 parent a30dccd commit 83c6007
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
10 changes: 0 additions & 10 deletions src/courseware/course/chat/Chat.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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. */}
Expand Down
2 changes: 0 additions & 2 deletions src/courseware/course/chat/Chat.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down

0 comments on commit 83c6007

Please sign in to comment.