@@ -11,7 +11,7 @@ import {
1111 useState ,
1212} from 'react'
1313import { NavigateFunction , Params , useNavigate , useParams } from 'react-router-dom'
14- import { toast , ToastContent } from 'react-toastify'
14+ import { toast } from 'react-toastify'
1515
1616import {
1717 Breadcrumb ,
@@ -44,7 +44,6 @@ import {
4444 UserCertificationProgressStatus ,
4545 userCertificationProgressUpdateAsync ,
4646 UserCertificationUpdateProgressActions ,
47- useShowSurvey ,
4847} from '../learn-lib'
4948import { 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