diff --git a/src/components/modals/main/Main.jsx b/src/components/modals/main/Main.jsx index 1e5888b7..6b5d3eae 100644 --- a/src/components/modals/main/Main.jsx +++ b/src/components/modals/main/Main.jsx @@ -20,7 +20,7 @@ const renderLoader = (current) => (
- Loading + {variables.language.getMessage(variables.languagecode, 'modals.main.loading')}
@@ -58,7 +58,7 @@ export default function MainModal({ modalClose }) { diff --git a/src/components/modals/main/marketplace/sections/Create.jsx b/src/components/modals/main/marketplace/sections/Create.jsx index 3c9280fc..bcf4f4dd 100644 --- a/src/components/modals/main/marketplace/sections/Create.jsx +++ b/src/components/modals/main/marketplace/sections/Create.jsx @@ -578,7 +578,7 @@ export default class Create extends PureComponent {
{this.state.currentTab !== 1 && (
- + this.changeTab(this.state.currentTab - 1)} diff --git a/src/components/modals/main/marketplace/sections/Marketplace.jsx b/src/components/modals/main/marketplace/sections/Marketplace.jsx index 9e95586c..aba1f8f7 100644 --- a/src/components/modals/main/marketplace/sections/Marketplace.jsx +++ b/src/components/modals/main/marketplace/sections/Marketplace.jsx @@ -300,7 +300,7 @@ export default class Marketplace extends PureComponent { <>
- + this.returnToMain()} />
diff --git a/src/components/modals/main/settings/sections/Search.jsx b/src/components/modals/main/settings/sections/Search.jsx index 2cafba3d..db5b5422 100644 --- a/src/components/modals/main/settings/sections/Search.jsx +++ b/src/components/modals/main/settings/sections/Search.jsx @@ -143,7 +143,7 @@ export default class SearchSettings extends PureComponent { diff --git a/src/components/modals/main/settings/sections/background/Background.jsx b/src/components/modals/main/settings/sections/background/Background.jsx index 6c1a889f..f8b09170 100644 --- a/src/components/modals/main/settings/sections/background/Background.jsx +++ b/src/components/modals/main/settings/sections/background/Background.jsx @@ -207,7 +207,7 @@ export default class BackgroundSettings extends PureComponent { category="background" element="#backgroundImage" /> - + i.type === 'quotes'); return this.setState({ quote: '"' + data[quotePackAPI.quote] + '"', author, - authorimg: authorimgdata.authorimg, - authorimglicense: authorimgdata.authorimglicense, + authorimg: info.icon_url }); } catch (e) { return this.doOffline(); @@ -228,14 +229,15 @@ export default class Quote extends PureComponent { if (quotePack) { const data = quotePack[Math.floor(Math.random() * quotePack.length)]; - const authorimgdata = await this.getAuthorImg(data.author); + const installed = JSON.parse(localStorage.getItem('installed')); + // todo: make this actually get the correct quote pack, instead of the first available + const info = installed.find((i) => i.type === 'quotes'); return this.setState({ quote: '"' + data.quote + '"', author: data.author, authorlink: this.getAuthorLink(data.author), - authorimg: authorimgdata.authorimg, - authorimglicense: authorimgdata.authorimglicense, + authorimg: info.icon_url }); } else { return this.doOffline(); diff --git a/src/components/widgets/time/Clock.jsx b/src/components/widgets/time/Clock.jsx index a8c8941b..7cc2d31d 100644 --- a/src/components/widgets/time/Clock.jsx +++ b/src/components/widgets/time/Clock.jsx @@ -43,7 +43,7 @@ export default class Clock extends PureComponent { break; case 'analogue': // load analog clock css - require('react-clock/dist/Clock.css'); + import('react-clock/dist/Clock.css'); this.setState({ time: now, diff --git a/src/modules/helpers/background/widget.js b/src/modules/helpers/background/widget.js index 095319cf..526616a3 100644 --- a/src/modules/helpers/background/widget.js +++ b/src/modules/helpers/background/widget.js @@ -1,4 +1,5 @@ // since there is so much code in the component, we have moved it to a separate file +import offlineImages from './offlineImages.json'; export function videoCheck(url) { return ( url.startsWith('data:video/') || @@ -9,8 +10,6 @@ export function videoCheck(url) { } export function offlineBackground() { - const offlineImages = require('./offlineImages.json'); - // Get all photographers from the keys in offlineImages.json const photographers = Object.keys(offlineImages); const photographer = photographers[Math.floor(Math.random() * photographers.length)];