File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed
src-ts/tools/learn/free-code-camp Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -194,10 +194,11 @@ const FreeCodeCamp: FC<{}> = () => {
194194 }
195195 }
196196
197- function handleFccLessonComplete ( ) : void {
197+ function handleFccLessonComplete ( challengeUuid : string ) : void {
198198 const currentLesson : { [ key : string ] : string } = {
199199 lesson : lessonParam ,
200200 module : moduleParam ,
201+ uuid : challengeUuid ,
201202 }
202203 if ( certificateProgress ) {
203204 userCertificationProgressUpdateAsync (
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ interface FccFrameProps {
1717 lesson ?: LearnLessonMeta
1818 onFccLastLessonNavigation : ( ) => void
1919 onFccLessonChange : ( path : string ) => void
20- onFccLessonComplete : ( ) => void
20+ onFccLessonComplete : ( challengeUuid : string ) => void
2121}
2222
2323const FccFrame : FC < FccFrameProps > = ( props : FccFrameProps ) => {
@@ -56,14 +56,20 @@ const FccFrame: FC<FccFrameProps> = (props: FccFrameProps) => {
5656 return
5757 }
5858
59- const { event : eventName , data } : { data : { path : string } , event : string } = JSON . parse ( jsonData )
59+ const { event : eventName , data } : {
60+ data : {
61+ meta : { id : string } ,
62+ path : string ,
63+ } ,
64+ event : string ,
65+ } = JSON . parse ( jsonData )
6066
6167 if ( eventName === 'fcc:nav:last-challenge' ) {
6268 onFccLastLessonNavigation ( )
6369 }
6470
6571 if ( eventName === 'fcc:challenge:completed' ) {
66- onFccLessonComplete ( )
72+ onFccLessonComplete ( data ?. meta ?. id )
6773 }
6874
6975 if ( eventName === 'fcc:challenge:ready' ) {
You can’t perform that action at this time.
0 commit comments