reset warnings and badge on workspace change

pull/1399/head
Aniket-Engg 3 years ago committed by Aniket
parent 80d1fe4d48
commit 987ec37f25
  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