@@ -11,7 +11,7 @@ import {
11
11
useState ,
12
12
} from 'react'
13
13
import { NavigateFunction , Params , useNavigate , useParams } from 'react-router-dom'
14
- import { toast , ToastContent } from 'react-toastify'
14
+ import { toast } from 'react-toastify'
15
15
16
16
import {
17
17
Breadcrumb ,
@@ -44,7 +44,6 @@ import {
44
44
UserCertificationProgressStatus ,
45
45
userCertificationProgressUpdateAsync ,
46
46
UserCertificationUpdateProgressActions ,
47
- useShowSurvey ,
48
47
} from '../learn-lib'
49
48
import { getCertificationCompletedPath , getCoursePath , getLessonPathFromModule } from '../learn.routes'
50
49
@@ -72,11 +71,6 @@ const FreeCodeCamp: FC<{}> = () => {
72
71
const [ lessonParam , setLessonParam ] : [ string , Dispatch < SetStateAction < string > > ]
73
72
= useState ( textFormatGetSafeString ( routeParams . lesson ) )
74
73
75
- const [ showSurvey , setShowSurvey ] : [
76
- string ,
77
- Dispatch < SetStateAction < string > >
78
- ] = useShowSurvey ( )
79
-
80
74
const {
81
75
certificationProgress : certificateProgress ,
82
76
setCertificateProgress,
@@ -461,22 +455,12 @@ const FreeCodeCamp: FC<{}> = () => {
461
455
isLoggedIn ,
462
456
] )
463
457
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
-
475
458
/**
476
459
* Complete course shortcut for admins
477
460
*/
478
461
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?' )
480
464
481
465
if ( ! certificateProgress ?. id || ! confirmed ) {
482
466
return
0 commit comments