diff --git a/package-lock.json b/package-lock.json index a57755ef..e0d5687b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -40,7 +40,6 @@ "react-redux": "^7.2.4", "react-router-dom": "6.27.0", "react-share": "^4.4.0", - "react-zendesk": "^0.1.13", "redux": "4.2.1", "redux-logger": "3.0.6", "redux-thunk": "2.4.2", @@ -15395,14 +15394,6 @@ "react-dom": ">=16.6.0" } }, - "node_modules/react-zendesk": { - "version": "0.1.13", - "resolved": "https://registry.npmjs.org/react-zendesk/-/react-zendesk-0.1.13.tgz", - "integrity": "sha512-9UNzzgdgC8nr2nZ13PNudspUClZZgsnS3FofnuGK1I7+yDPNAP8iDFD2WSQRJmYDAzH+mTlVB4K+G8lY1/0B+w==", - "dependencies": { - "prop-types": "^15.7.2" - } - }, "node_modules/readable-stream": { "version": "3.6.2", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", diff --git a/package.json b/package.json index 7b917aeb..292c1a94 100755 --- a/package.json +++ b/package.json @@ -60,7 +60,6 @@ "react-redux": "^7.2.4", "react-router-dom": "6.27.0", "react-share": "^4.4.0", - "react-zendesk": "^0.1.13", "redux": "4.2.1", "redux-logger": "3.0.6", "redux-thunk": "2.4.2", diff --git a/src/App.test.jsx b/src/App.test.jsx index 54204a0a..6b31ffc3 100644 --- a/src/App.test.jsx +++ b/src/App.test.jsx @@ -17,7 +17,6 @@ jest.mock('@edx/frontend-component-footer', () => ({ FooterSlot: 'Footer' })); jest.mock('containers/Dashboard', () => 'Dashboard'); jest.mock('containers/LearnerDashboardHeader', () => 'LearnerDashboardHeader'); -jest.mock('components/ZendeskFab', () => 'ZendeskFab'); jest.mock('containers/WidgetContainers/AppWrapper', () => 'AppWrapper'); jest.mock('data/redux', () => ({ selectors: 'redux.selectors', diff --git a/src/components/ZendeskFab/__snapshots__/index.test.jsx.snap b/src/components/ZendeskFab/__snapshots__/index.test.jsx.snap deleted file mode 100644 index 23ccdd5a..00000000 --- a/src/components/ZendeskFab/__snapshots__/index.test.jsx.snap +++ /dev/null @@ -1,65 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`ZendeskFab snapshot 1`] = ` - -`; diff --git a/src/components/ZendeskFab/index.jsx b/src/components/ZendeskFab/index.jsx deleted file mode 100644 index 55e69a61..00000000 --- a/src/components/ZendeskFab/index.jsx +++ /dev/null @@ -1,56 +0,0 @@ -import React from 'react'; - -import { getConfig } from '@edx/frontend-platform'; -import { useIntl } from '@edx/frontend-platform/i18n'; - -import Zendesk from 'react-zendesk'; -import messages from './messages'; - -const ZendeskFab = () => { - const { formatMessage } = useIntl(); - const setting = { - cookies: true, - webWidget: { - contactOptions: { - enabled: false, - }, - chat: { - suppress: false, - departments: { - enabled: ['account settings', 'billing and payments', 'certificates', 'deadlines', 'errors and technical issues', 'other', 'proctoring'], - }, - }, - contactForm: { - ticketForms: [ - { - id: 360003368814, - subject: false, - fields: [{ id: 'description', prefill: { '*': '' } }], - }, - ], - selectTicketForm: { - '*': formatMessage(messages.selectTicketForm), - }, - attachments: true, - }, - helpCenter: { - originalArticleButton: true, - }, - answerBot: { - suppress: false, - contactOnlyAfterQuery: true, - title: { '*': formatMessage(messages.supportTitle) }, - avatar: { - url: 'https://edx-cdn.org/v3/prod/favicon.ico', - name: { '*': formatMessage(messages.supportTitle) }, - }, - }, - }, - }; - - return ( - - ); -}; - -export default ZendeskFab; diff --git a/src/components/ZendeskFab/index.test.jsx b/src/components/ZendeskFab/index.test.jsx deleted file mode 100644 index d57da5d4..00000000 --- a/src/components/ZendeskFab/index.test.jsx +++ /dev/null @@ -1,12 +0,0 @@ -import { shallow } from '@edx/react-unit-test-utils'; - -import ZendeskFab from '.'; - -jest.mock('react-zendesk', () => 'Zendesk'); - -describe('ZendeskFab', () => { - test('snapshot', () => { - const wrapper = shallow(); - expect(wrapper.snapshot).toMatchSnapshot(); - }); -}); diff --git a/src/components/ZendeskFab/messages.js b/src/components/ZendeskFab/messages.js deleted file mode 100644 index 0178ebb8..00000000 --- a/src/components/ZendeskFab/messages.js +++ /dev/null @@ -1,16 +0,0 @@ -import { defineMessages } from '@edx/frontend-platform/i18n'; - -const messages = defineMessages({ - supportTitle: { - id: 'zendesk.supportTitle', - description: 'Title for the support button', - defaultMessage: 'edX Support', - }, - selectTicketForm: { - id: 'zendesk.selectTicketForm', - description: 'Select ticket form', - defaultMessage: 'Please choose your request type:', - }, -}); - -export default messages;