mirror of
https://github.com/mue/mue.git
synced 2026-07-20 07:24:08 +02:00
fix things
This commit is contained in:
@@ -108,6 +108,7 @@ export default class App extends React.PureComponent {
|
||||
<Modal onRequestClose={() => this.setState({ addonsModal: false })} isOpen={this.state.addonsModal} className={modalClassList} overlayClassName='Overlay' ariaHideApp={false}>
|
||||
<Addons
|
||||
language={language.addons}
|
||||
marketplaceLanguage={language.marketplace}
|
||||
modalLanguage={language.modals}
|
||||
modalClose={() => this.setState({ addonsModal: false })}
|
||||
openSettings={() => this.setState({ addonsModal: false, settingsModal: true })}
|
||||
|
||||
@@ -111,7 +111,7 @@ export default class Addons extends React.PureComponent {
|
||||
</div>)}
|
||||
</div>
|
||||
</div>
|
||||
<Item button={<button className='removeFromMue' onClick={() => this.uninstall()}>{this.props.language.product.buttons.remove}</button>} data={this.state.item_data} function={() => this.toggle()} language={this.props.language.product} />
|
||||
<Item button={<button className='removeFromMue' onClick={() => this.uninstall()}>{this.props.marketplaceLanguage.product.buttons.remove}</button>} data={this.state.item_data} function={() => this.toggle()} language={this.props.marketplaceLanguage.product} />
|
||||
</div>;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -143,7 +143,7 @@ export default class Marketplace extends React.PureComponent {
|
||||
installStuff();
|
||||
break;
|
||||
case 'quote_packs':
|
||||
if (this.state.current_data.content.data.quoteapi) localStorage.setItem('quote_api', JSON.stringify(this.state.current_data.content.data.quoteapi));
|
||||
if (this.state.current_data.content.data.quote_api) localStorage.setItem('quote_api', JSON.stringify(this.state.current_data.content.data.quote_api));
|
||||
localStorage.setItem('quote_packs', JSON.stringify(this.state.current_data.content.data.quotes));
|
||||
installStuff();
|
||||
break;
|
||||
|
||||
@@ -22,7 +22,11 @@ export default class Quote extends React.PureComponent {
|
||||
}
|
||||
|
||||
getQuotePack() {
|
||||
const quotePack = JSON.parse(localStorage.getItem('quote_packs'));
|
||||
let quotePack = localStorage.getItem('quote_packs');
|
||||
console.log(quotePack)
|
||||
if (quotePack === 'undefined') return this.doOffline();
|
||||
quotePack = JSON.parse(quotePack);
|
||||
|
||||
if (quotePack) {
|
||||
const data = quotePack[Math.floor(Math.random() * quotePack.length)];
|
||||
return this.setState({
|
||||
|
||||
Reference in New Issue
Block a user