@@ -128,7 +128,7 @@ export const ReviewImportDetails = ({ courseId, markAnalysisComplete }: Props) =
128128 if ( ! blockTypes ) {
129129 return undefined ;
130130 }
131- return Object . entries ( blockTypes ) . filter ( ( [ blockType , ] ) => (
131+ return Object . entries ( blockTypes ) . filter ( ( [ blockType ] ) => (
132132 getConfig ( ) . LIBRARY_UNSUPPORTED_BLOCKS . includes ( blockType )
133133 ) ) ;
134134 } , [ blockTypes ] ) ;
@@ -137,16 +137,14 @@ export const ReviewImportDetails = ({ courseId, markAnalysisComplete }: Props) =
137137 if ( ! unsupportedBlockTypes ) {
138138 return 0 ;
139139 }
140- const unsupportedBlocks = unsupportedBlockTypes . reduce ( ( total , [ , count ] ) => {
141- return total + count ;
142- } , 0 ) ;
140+ const unsupportedBlocks = unsupportedBlockTypes . reduce ( ( total , [ , count ] ) => total + count , 0 ) ;
143141 return unsupportedBlocks ;
144142 } , [ unsupportedBlockTypes ] ) ;
145143
146144 const { data : unsupportedBlocksData } = useGetContentHits ( [
147145 `context_key = "${ courseId } "` ,
148146 `block_type IN [${ unsupportedBlockTypes ?. flatMap ( ( [ value ] ) => `"${ value } "` ) . join ( ',' ) } ]` ,
149- ] , totalUnsupportedBlocks > 0 , totalUnsupportedBlocks , 'always' )
147+ ] , totalUnsupportedBlocks > 0 , totalUnsupportedBlocks , 'always' ) ;
150148
151149 const { data : unsupportedBlocksChildren } = useGetBlockTypes ( [
152150 `context_key = "${ courseId } "` ,
@@ -157,15 +155,14 @@ export const ReviewImportDetails = ({ courseId, markAnalysisComplete }: Props) =
157155 if ( ! unsupportedBlocksChildren ) {
158156 return 0 ;
159157 }
160- const unsupportedBlocks = Object . values ( unsupportedBlocksChildren ) . reduce ( ( total , count ) => {
161- return total + count ;
162- } , 0 ) ;
158+ const unsupportedBlocks = Object . values ( unsupportedBlocksChildren ) . reduce ( ( total , count ) => total + count , 0 ) ;
163159 return unsupportedBlocks ;
164160 } , [ unsupportedBlocksChildren ] ) ;
165161
166- const finalUnssupportedBlocks = useMemo ( ( ) => {
167- return totalUnsupportedBlocks + totalUnsupportedBlockChildren ;
168- } , [ totalUnsupportedBlocks , totalUnsupportedBlockChildren ] ) ;
162+ const finalUnssupportedBlocks = useMemo (
163+ ( ) => totalUnsupportedBlocks + totalUnsupportedBlockChildren ,
164+ [ totalUnsupportedBlocks , totalUnsupportedBlockChildren ] ,
165+ ) ;
169166
170167 const totalBlocks = useMemo ( ( ) => {
171168 if ( ! blockTypes ) {
0 commit comments