mirror of https://github.com/mue/mue.git
chore: remove junk from stats
This commit is contained in:
parent
bef5bfa22a
commit
8d57ce050d
|
@ -4,7 +4,6 @@ import { PureComponent } from 'react';
|
|||
import { MdShowChart } from 'react-icons/md';
|
||||
import { FaTrophy } from 'react-icons/fa';
|
||||
|
||||
import EventBus from 'modules/helpers/eventbus';
|
||||
import achievementsData from 'modules/helpers/settings/achievements.json';
|
||||
import translations from 'modules/helpers/settings/achievement_translations/index';
|
||||
|
||||
|
@ -68,26 +67,10 @@ export default class Stats extends PureComponent {
|
|||
}
|
||||
|
||||
componentDidMount() {
|
||||
EventBus.on('refresh', (data) => {
|
||||
if (data === 'stats') {
|
||||
if (localStorage.getItem('stats') === 'false') {
|
||||
localStorage.setItem('statsData', JSON.stringify({}));
|
||||
return this.setState({
|
||||
stats: {},
|
||||
});
|
||||
}
|
||||
this.forceUpdate();
|
||||
}
|
||||
});
|
||||
|
||||
this.getAchievements();
|
||||
this.forceUpdate();
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
EventBus.off('refresh');
|
||||
}
|
||||
|
||||
render() {
|
||||
const achievementElement = (key, name, achieved) => (
|
||||
<div className="achievement">
|
||||
|
|
|
@ -20,9 +20,7 @@ document.documentElement.lang = languagecode.replace('_', '-');
|
|||
variables.getMessage = (text, optional) =>
|
||||
variables.language.getMessage(variables.languagecode, text, optional || {});
|
||||
|
||||
if (localStorage.getItem('stats') === 'true') {
|
||||
variables.stats = Stats;
|
||||
}
|
||||
variables.stats = Stats;
|
||||
|
||||
Sentry.init({
|
||||
dsn: variables.constants.SENTRY_DSN,
|
||||
|
|
Loading…
Reference in New Issue