File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
src-ts/tools/learn/free-code-camp Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,7 @@ import { FccFrame } from './fcc-frame'
4545import { FccSidebar } from './fcc-sidebar'
4646import { TitleNav } from './title-nav'
4747import styles from './FreeCodeCamp.module.scss'
48+ import { debounce } from 'lodash'
4849
4950const FreeCodeCamp : FC < { } > = ( ) => {
5051
@@ -211,7 +212,7 @@ const FreeCodeCamp: FC<{}> = () => {
211212 profile ?. userId ,
212213 ] )
213214
214- const handleFccLessonComplete : ( challengeUuid : string ) => void = useCallback ( ( challengeUuid : string ) => {
215+ const handleFccLessonComplete : ( challengeUuid : string ) => void = useCallback ( debounce ( ( challengeUuid : string ) => {
215216
216217 const currentLesson : { [ key : string ] : string } = {
217218 lesson : lessonParam ,
@@ -239,7 +240,7 @@ const FreeCodeCamp: FC<{}> = () => {
239240
240241 } )
241242 // eslint-disable-next-line react-hooks/exhaustive-deps
242- } , [
243+ } , 30 ) , [
243244 certificateProgress ,
244245 lessonParam ,
245246 moduleParam ,
@@ -280,7 +281,7 @@ const FreeCodeCamp: FC<{}> = () => {
280281 * Handle the navigation away from the last step of the course in the FCC frame
281282 * @returns
282283 */
283- const handleFccLastLessonNavigation : ( ) => void = useCallback ( ( ) => {
284+ const handleFccLastLessonNavigation : ( ) => void = useCallback ( debounce ( ( ) => {
284285
285286 if ( ! certificateProgress ) {
286287 return
@@ -326,7 +327,7 @@ const FreeCodeCamp: FC<{}> = () => {
326327
327328 navigate ( nextLessonPath )
328329 // eslint-disable-next-line react-hooks/exhaustive-deps
329- } , [
330+ } , 30 ) , [
330331 certificateProgress ,
331332 certificationParam ,
332333 courseData ?. modules ,
You can’t perform that action at this time.
0 commit comments