fix message on badge

pull/3838/head
Joseph Izang 1 year ago
parent 7ef56f0047
commit 52a8556565
  1. 14
      apps/remix-ide/src/app/tabs/analysis-tab.js

@ -37,15 +37,6 @@ class AnalysisTab extends ViewPlugin {
'offsettolinecolumnconverter').api 'offsettolinecolumnconverter').api
} }
this.dispatch = null this.dispatch = null
/**
* @type {Array<{
formattedMessage: string;
type: "warning" | "error";
column: number;
line: number;
}>}
* @description Array of objects containing the results of Linting
*/
this.hints = [] this.hints = []
} }
@ -70,9 +61,10 @@ class AnalysisTab extends ViewPlugin {
} }
if (count > 0) { if (count > 0) {
this.emit('statusChanged', { key: count, title: `${count} warning${count === 1 ? '' : 's'}`, type: payloadType }) // this.emit('statusChanged', { key: count, title: `${count} warning${count === 1 ? '' : 's'}`, type: payloadType })
this.emit('statusChanged', { key: count, title: payloadType === 'error' ? `You have some problem${count === 1 ? '' : 's'}` : 'You have some warnings', type: payloadType })
} else if (count === 0) { } else if (count === 0) {
this.emit('statusChanged', { key: 'succeed', title: 'no warning', type: 'success' }) this.emit('statusChanged', { key: 'succeed', title: 'no warnings or errors', type: 'success' })
} else { } else {
// count ==-1 no compilation result // count ==-1 no compilation result
this.emit('statusChanged', { key: 'none' }) this.emit('statusChanged', { key: 'none' })

Loading…
Cancel
Save