mirror of
https://github.com/mue/mue.git
synced 2026-07-23 00:37:27 +02:00
refactor: clean translation system and more widget stuff
This commit is contained in:
@@ -15,7 +15,6 @@ import EventBus from 'modules/helpers/eventbus';
|
||||
// however, when we used the original module https://bundlephobia.com/package/weather-icons-react@1.2.0
|
||||
// as seen here it is ridiculously large
|
||||
const Weather = lazy(() => import('./weather/Weather'));
|
||||
const renderLoader = () => <></>;
|
||||
|
||||
export default class Widgets extends PureComponent {
|
||||
online = localStorage.getItem('offlineMode') === 'false';
|
||||
@@ -73,11 +72,9 @@ export default class Widgets extends PureComponent {
|
||||
<div id="widgets" />
|
||||
) : (
|
||||
<div id="widgets">
|
||||
<Suspense fallback={renderLoader()}>
|
||||
<Suspense fallback={<></>}>
|
||||
{this.enabled('searchBar') ? <Search /> : null}
|
||||
{this.state.order.map((element) => (
|
||||
this.widgets[element]
|
||||
))}
|
||||
{this.state.order.map((element) => this.widgets[element])}
|
||||
{this.enabled('weatherEnabled') && this.online ? <Weather /> : null}
|
||||
</Suspense>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user