import React 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 { ToastContainer } from 'react-toastify'; export default class App extends React.PureComponent { componentDidMount() { if (!localStorage.getItem('firstRun')) { SettingsFunctions.setDefaultSettings(); window.location.reload(); } // 4.0 -> 5.0 (the key below is only on 5.0) if (!localStorage.getItem('order')) { SettingsFunctions.moveSettings(); window.location.reload(); } SettingsFunctions.loadSettings(); EventBus.on('refresh', (data) => { if (data === 'other') { SettingsFunctions.loadSettings(true); } }); } render() { return ( <> {(localStorage.getItem('background') === 'true') ? : null}
); } }