refactor: imports etc

This commit is contained in:
David Ralph
2021-08-14 20:10:48 +01:00
parent 1a8bb69288
commit 39751736ca
55 changed files with 403 additions and 423 deletions

View File

@@ -1,29 +1,29 @@
import React from 'react';
import { PureComponent } from 'react';
import Background from './components/widgets/background/Background';
import Widgets from './components/widgets/Widgets';
import Modals from './components/modals/Modals';
import EventBus from './modules/helpers/eventbus';
import SettingsFunctions from './modules/helpers/settings';
import { loadSettings, moveSettings } from './modules/helpers/settings';
import { ToastContainer } from 'react-toastify';
export default class App extends React.PureComponent {
export default class App extends PureComponent {
componentDidMount() {
// 4.0 -> 5.0 (the key below is only on 5.0)
// now featuring 5.0 -> 5.1
// the firstRun check was moved here because the old function was useless
if (!localStorage.getItem('firstRun') || !localStorage.getItem('stats')) {
SettingsFunctions.moveSettings();
moveSettings();
window.location.reload();
}
SettingsFunctions.loadSettings();
loadSettings();
EventBus.on('refresh', (data) => {
if (data === 'other') {
SettingsFunctions.loadSettings(true);
loadSettings(true);
}
});