diff --git a/src/components/Sidebar/index.jsx b/src/components/Sidebar/index.jsx index 245ec234..2b204a6b 100644 --- a/src/components/Sidebar/index.jsx +++ b/src/components/Sidebar/index.jsx @@ -91,7 +91,6 @@ const Sidebar = ({ show all the audit trial data, expired or not. */ const getDaysRemainingMessage = () => { - console.log("auditTrialDaysRemaining", auditTrialDaysRemaining) if (auditTrialDaysRemaining > 1) { const irtl = new Intl.RelativeTimeFormat({ style: 'long' }); diff --git a/src/data/thunks.js b/src/data/thunks.js index 367d2e24..5d654646 100644 --- a/src/data/thunks.js +++ b/src/data/thunks.js @@ -1,6 +1,7 @@ import { sendTrackEvent } from '@edx/frontend-platform/analytics'; import { getAuthenticatedUser } from '@edx/frontend-platform/auth'; +import { camelCaseObject } from '@edx/frontend-platform'; import trackChatBotMessageOptimizely from '../utils/optimizelyExperiment'; import { fetchChatResponse, @@ -20,7 +21,6 @@ import { setAuditTrialLengthDays, } from './slice'; import { OPTIMIZELY_PROMPT_EXPERIMENT_KEY } from './optimizely'; -import { camelCaseObject } from '@edx/frontend-platform'; export function addChatMessage(role, content, courseId, promptExperimentVariationKey = undefined) { return (dispatch, getState) => { @@ -72,6 +72,7 @@ export function getChatResponse(courseId, unitId, promptExperimentVariationKey = // Refresh chat summary only on the first message so we can tell if the user has initiated an audit trial // NOTE: This is a bit of a hacky solution that may be refined later if (messageList.length === 1) { + // eslint-disable-next-line no-use-before-define dispatch(getLearningAssistantChatSummary(courseId)); } @@ -143,8 +144,8 @@ export function getLearningAssistantChatSummary(courseId) { // Validate audit trial data & dates const auditTrialDatesValid = !( - Number.isNaN(Date.parse(auditTrial.startDate)) || - Number.isNaN(Date.parse(auditTrial.expirationDate)) + Number.isNaN(Date.parse(auditTrial.startDate)) + || Number.isNaN(Date.parse(auditTrial.expirationDate)) ); if (Object.keys(auditTrial).length !== 0 && auditTrialDatesValid) { diff --git a/src/hooks/use-course-upgrade.js b/src/hooks/use-course-upgrade.js index 0f4b9f87..b78cbe4a 100644 --- a/src/hooks/use-course-upgrade.js +++ b/src/hooks/use-course-upgrade.js @@ -25,7 +25,6 @@ export default function useCourseUpgrade() { auditTrialDaysRemaining = Math.ceil((auditTrialExpirationDate - Date.now()) / millisecondsInOneDay); auditTrialExpired = auditTrialDaysRemaining < 0; - console.log({upgradeUrl}, {auditTrialDaysRemaining}) } return { diff --git a/src/widgets/Xpert.jsx b/src/widgets/Xpert.jsx index 78fcd244..2a5b32d3 100644 --- a/src/widgets/Xpert.jsx +++ b/src/widgets/Xpert.jsx @@ -1,5 +1,5 @@ import PropTypes from 'prop-types'; -import { useEffect, useMemo, useState } from 'react'; +import { useEffect, useMemo } from 'react'; import { useDispatch, useSelector } from 'react-redux'; import { updateSidebarIsOpen, getLearningAssistantChatSummary } from '../data/thunks';