mirror of
https://github.com/mue/mue.git
synced 2026-07-18 22:44:08 +02:00
perf: add eventbus unmount in more places and optimise stats tab
This commit is contained in:
@@ -19,12 +19,16 @@ export default class Stats extends PureComponent {
|
||||
if (localStorage.getItem('stats') === 'false') {
|
||||
localStorage.setItem('statsData', JSON.stringify({}));
|
||||
return this.setState({
|
||||
stats: JSON.parse(localStorage.getItem('statsData')) || {}
|
||||
stats: {}
|
||||
});
|
||||
}
|
||||
this.forceUpdate();
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
EventBus.off('refresh');
|
||||
}
|
||||
|
||||
render() {
|
||||
|
||||
Reference in New Issue
Block a user