mirror of
https://github.com/mue/mue.git
synced 2026-07-23 00:37:27 +02:00
refactor and fix some things
This commit is contained in:
@@ -93,15 +93,12 @@ export default class Quote extends React.PureComponent {
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
if (localStorage.getItem('quote') === 'false') return;
|
||||
if (localStorage.getItem('favouriteQuote')) this.setState({ favourited: <StarIcon className='copyButton' onClick={() => this.favourite()} /> });
|
||||
if (localStorage.getItem('favouriteQuoteEnabled') === 'false') this.setState({ favourited: null });
|
||||
this.getQuote();
|
||||
}
|
||||
|
||||
render() {
|
||||
if (localStorage.getItem('quote') === 'false') return null;
|
||||
|
||||
let copy = <FileCopy className='copyButton' onClick={() => this.copyQuote()}></FileCopy>;
|
||||
if (localStorage.getItem('copyButton') === 'false') copy = null;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user