File tree Expand file tree Collapse file tree 1 file changed +6
-18
lines changed
src-ts/tools/learn/free-code-camp Expand file tree Collapse file tree 1 file changed +6
-18
lines changed Original file line number Diff line number Diff line change @@ -274,24 +274,12 @@ const FreeCodeCamp: FC<{}> = () => {
274274
275275 // This is the last lesson to be completed in the first module completed,
276276 // so it's time to trigger the survey
277- const surveyTrigger : string = 'TCA First Module Completed'
278-
279- // If there is only one assessment in a cert (e.g. Data Analysis w/Python),
280- // the cert is also completed, which redirects the user to the cert page.
281- // So the survey needs to be delayed so that it appears on the completed
282- // cert page instead of the current lesson.
283-
284- // NOTE: we can't use the cert's status here bc it doesn't get set to
285- // completed until the UI notices the cert is complete and initiates
286- // the completion. And we have to use >= instead of === because it's
287- // possible TCA data isn't in sync w/the latest FCC curriculum.
288- if ( progress . certificationProgressPercentage >= 100 ) {
289- setTimeout ( async ( ) => {
290- surveyTriggerForUser ( surveyTrigger , profile ?. userId )
291- } , 1000 )
292- } else {
293- surveyTriggerForUser ( surveyTrigger , profile ?. userId )
294- }
277+
278+ // NOTE: We have to add a delay, otherwise the survey closes when the user
279+ // is automatically redirected to the next lesson.
280+ setTimeout ( ( ) => {
281+ surveyTriggerForUser ( 'TCA First Module Completed' , profile ?. userId )
282+ } , 1000 )
295283 }
296284
297285 /**
You can’t perform that action at this time.
0 commit comments