reset warnings and badge on workspace change

pull/5370/head
Aniket-Engg 3 years ago committed by Aniket
parent 0bd8e41cd7
commit 9bea0dafa7
  1. 10
      libs/remix-ui/static-analyser/src/lib/remix-ui-static-analyser.tsx

@ -77,6 +77,16 @@ export const RemixUiStaticAnalyser = (props: RemixUiStaticAnalyserProps) => {
return () => { }
}, [state])
useEffect(() => {
props.analysisModule.on('filePanel', 'setWorkspace', () => {
// Reset warning state
setWarningState([])
// Reset badge
props.event.trigger('staticAnaysisWarning', [])
})
return () => { }
}, [props.analysisModule])
const message = (name, warning, more, fileName, locationString) : string => {
return (`
<span className='d-flex flex-column'>

Loading…
Cancel
Save