From 26f5e0b0e5dbb7c92d0d48ebbdcc5aaeb62596c7 Mon Sep 17 00:00:00 2001 From: David Ralph Date: Wed, 14 Oct 2020 10:42:11 +0100 Subject: [PATCH] fix errors --- src/components/modals/marketplace/Items.jsx | 2 +- src/components/widgets/Quote.jsx | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/components/modals/marketplace/Items.jsx b/src/components/modals/marketplace/Items.jsx index e030c545..30ff2db6 100644 --- a/src/components/modals/marketplace/Items.jsx +++ b/src/components/modals/marketplace/Items.jsx @@ -11,7 +11,7 @@ export default class Items extends React.PureComponent {

{this.props.title}

{this.props.items.map((item) => -
this.props.toggleFunction(item.name)}> +
this.props.toggleFunction(item.name)} key={item.name}> icon

{item.display_name}

diff --git a/src/components/widgets/Quote.jsx b/src/components/widgets/Quote.jsx index 765d7115..62d02e3a 100644 --- a/src/components/widgets/Quote.jsx +++ b/src/components/widgets/Quote.jsx @@ -92,6 +92,7 @@ export default class Quote extends React.PureComponent { componentDidMount() { if (localStorage.getItem('quote') === 'false') return; if (localStorage.getItem('favouriteQuote')) this.setState({ favourited: this.favourite()} /> }); + if (localStorage.getItem('favouriteQuoteEnabled') === 'false') this.setState({ favourited: null }); this.getQuote(); } @@ -102,8 +103,6 @@ export default class Quote extends React.PureComponent { let tweet = window.open(`https://twitter.com/intent/tweet?text=${this.state.quote} - ${this.state.author} on @getmue`, '_blank').focus()}/> if (localStorage.getItem('tweetButton') === 'false') tweet = null; - if (localStorage.getItem('favouriteQuoteEnabled') === 'false') this.setState({ favourited: null }); - return (

{`${this.state.quote}`}