toggele analysis count update

pull/5370/head
aniket-engg 3 years ago committed by Aniket
parent ba919ec0f7
commit 8a6676b868
  1. 4
      libs/remix-ui/static-analyser/src/lib/remix-ui-static-analyser.tsx

@ -133,13 +133,17 @@ export const RemixUiStaticAnalyser = (props: RemixUiStaticAnalyserProps) => {
} }
const showWarningsByModule = (showOnlyModule: string) => { const showWarningsByModule = (showOnlyModule: string) => {
let count = 0
if(allWarnings[showOnlyModule]) { if(allWarnings[showOnlyModule]) {
const newWarningState = {} const newWarningState = {}
newWarningState[showOnlyModule] = allWarnings[showOnlyModule] newWarningState[showOnlyModule] = allWarnings[showOnlyModule]
setWarningState({[showOnlyModule]: allWarnings[showOnlyModule]}) setWarningState({[showOnlyModule]: allWarnings[showOnlyModule]})
count = allWarnings[showOnlyModule].length
} else if (showOnlyModule === 'all') { } else if (showOnlyModule === 'all') {
setWarningState(allWarnings) setWarningState(allWarnings)
for (const e in allWarnings) count += allWarnings[e].length
} }
props.event.trigger('staticAnaysisWarning', [count])
} }
const run = (lastCompilationResult, lastCompilationSource, currentFile) => { const run = (lastCompilationResult, lastCompilationSource, currentFile) => {

Loading…
Cancel
Save