mirror of
https://github.com/mue/mue.git
synced 2026-07-17 22:14:13 +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() {
|
||||
|
||||
@@ -81,6 +81,10 @@ export default class WelcomeModal extends PureComponent {
|
||||
});
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
EventBus.off('refresh');
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<div className='welcomeContent'>
|
||||
|
||||
Reference in New Issue
Block a user