@@ -20,7 +20,6 @@ import {
2020 ProfileContextData ,
2121 surveyTriggerForUser ,
2222 textFormatGetSafeString ,
23- useLocalStorage ,
2423} from '../../../lib'
2524import {
2625 CoursesProviderData ,
@@ -40,13 +39,15 @@ import {
4039 UserCertificationProgressStatus ,
4140 userCertificationProgressUpdateAsync ,
4241 UserCertificationUpdateProgressActions ,
42+ useShowSurvey ,
4343} from '../learn-lib'
4444import { getCertificationCompletedPath , getCoursePath , getLessonPathFromModule } from '../learn.routes'
4545
4646import { FccFrame } from './fcc-frame'
4747import { FccSidebar } from './fcc-sidebar'
4848import { TitleNav } from './title-nav'
4949import styles from './FreeCodeCamp.module.scss'
50+ import { LearnConfig } from '../learn-config'
5051
5152const FreeCodeCamp : FC < { } > = ( ) => {
5253
@@ -70,7 +71,7 @@ const FreeCodeCamp: FC<{}> = () => {
7071 const [ showSurvey , setShowSurvey ] : [
7172 string ,
7273 Dispatch < SetStateAction < string > >
73- ] = useLocalStorage < string > ( 'tca-show-survey' , '' )
74+ ] = useShowSurvey ( )
7475
7576 const {
7677 certificationProgress : certificateProgress ,
@@ -455,7 +456,7 @@ const FreeCodeCamp: FC<{}> = () => {
455456
456457 useEffect ( ( ) => {
457458 if ( ready && showSurvey === certificationParam ) {
458- surveyTriggerForUser ( 'TCA First Module Completed' , profile ?. userId )
459+ surveyTriggerForUser ( LearnConfig . SURVEY . COMPLETED_FIRST_MODULE , profile ?. userId )
459460 setShowSurvey ( '' )
460461 }
461462 } , [
0 commit comments