Skip to content

Commit 0340eef

Browse files
Merge pull request #449 from topcoder-platform/TCA-790_survey
TCA-790 Remove obsolete Survey code -> dev
2 parents 04c3e47 + df21e6d commit 0340eef

File tree

1 file changed

+3
-19
lines changed

1 file changed

+3
-19
lines changed

src-ts/tools/learn/free-code-camp/FreeCodeCamp.tsx

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {
1111
useState,
1212
} from 'react'
1313
import { NavigateFunction, Params, useNavigate, useParams } from 'react-router-dom'
14-
import { toast, ToastContent } from 'react-toastify'
14+
import { toast } from 'react-toastify'
1515

1616
import {
1717
Breadcrumb,
@@ -44,7 +44,6 @@ import {
4444
UserCertificationProgressStatus,
4545
userCertificationProgressUpdateAsync,
4646
UserCertificationUpdateProgressActions,
47-
useShowSurvey,
4847
} from '../learn-lib'
4948
import { getCertificationCompletedPath, getCoursePath, getLessonPathFromModule } from '../learn.routes'
5049

@@ -72,11 +71,6 @@ const FreeCodeCamp: FC<{}> = () => {
7271
const [lessonParam, setLessonParam]: [string, Dispatch<SetStateAction<string>>]
7372
= useState(textFormatGetSafeString(routeParams.lesson))
7473

75-
const [showSurvey, setShowSurvey]: [
76-
string,
77-
Dispatch<SetStateAction<string>>
78-
] = useShowSurvey()
79-
8074
const {
8175
certificationProgress: certificateProgress,
8276
setCertificateProgress,
@@ -461,22 +455,12 @@ const FreeCodeCamp: FC<{}> = () => {
461455
isLoggedIn,
462456
])
463457

464-
useEffect(() => {
465-
if (ready && showSurvey === certificationParam) {
466-
surveyTriggerForUser(LearnConfig.SURVEY.COMPLETED_FIRST_MODULE, profile?.userId)
467-
setShowSurvey('')
468-
}
469-
}, [
470-
ready,
471-
showSurvey,
472-
certificationParam,
473-
]);
474-
475458
/**
476459
* Complete course shortcut for admins
477460
*/
478461
function adminCompleteCourse(): void {
479-
const confirmed = confirm('Hey, you\'re about to auto-complete this entire course. Are you sure?');
462+
// eslint-disable-next-line no-restricted-globals
463+
const confirmed: boolean = confirm('Hey, you\'re about to auto-complete this entire course. Are you sure?')
480464

481465
if (!certificateProgress?.id || !confirmed) {
482466
return

0 commit comments

Comments
 (0)