perf: experimental upgrade to deps and fix esbuild warnings

This commit is contained in:
David Ralph
2022-08-26 12:06:25 +01:00
parent b8f2b7fb1f
commit 218f7bec7b
6 changed files with 10 additions and 10 deletions

View File

@@ -390,7 +390,7 @@ export default class Create extends PureComponent {
// photos
const nextPhotosDisabled = !(
this.state.addonData.photos !== '' && this.state.addonData.photos !== []
this.state.addonData.photos !== ''
);
const addPhotos = (
<>

View File

@@ -74,7 +74,9 @@ export default class Widgets extends PureComponent {
<div id="widgets">
<Suspense fallback={<></>}>
{this.enabled('searchBar') ? <Search /> : null}
{this.state.order.map((element) => this.widgets[element])}
{this.state.order.map((element, key) => (
<Fragment key={key}>{this.widgets[element]}</Fragment>
))}
{this.enabled('weatherEnabled') && this.online ? <Weather /> : null}
</Suspense>
</div>

View File

@@ -216,7 +216,6 @@ export default class Background extends PureComponent {
if (
customBackground !== '' &&
customBackground !== 'undefined' &&
customBackground !== [''] &&
customBackground !== undefined
) {
const object = {

View File

@@ -204,8 +204,7 @@ export default class Quote extends PureComponent {
if (
customQuote &&
customQuote !== '' &&
customQuote !== 'undefined' &&
customQuote !== ['']
customQuote !== 'undefined'
) {
return this.setState({
quote: '"' + customQuote.quote + '"',

View File

@@ -1,4 +1,4 @@
import { render } from 'react-dom';
import { createRoot } from 'react-dom/client';
import * as Sentry from '@sentry/react';
import App from './App';
@@ -61,4 +61,4 @@ Sentry.init({
autoSessionTracking: false,
});
render(<App />, document.getElementById('root'));
createRoot(document.getElementById('root')).render(<App />);