mirror of
https://github.com/mue/mue.git
synced 2026-06-13 03:58:49 +02:00
stuff
This commit is contained in:
@@ -54,7 +54,9 @@ export default class Greeting extends React.PureComponent {
|
||||
const data = localStorage.getItem('greetingName');
|
||||
|
||||
if (typeof data === 'string') {
|
||||
if (data.replace(/\s/g, '').length > 0) name = `, ${data.trim()}`;
|
||||
if (data.replace(/\s/g, '').length > 0) {
|
||||
name = `, ${data.trim()}`;
|
||||
}
|
||||
}
|
||||
|
||||
if (custom === 'false') {
|
||||
|
||||
@@ -121,30 +121,12 @@ export default class Quote extends React.PureComponent {
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
if (localStorage.getItem('favouriteQuote')) {
|
||||
this.setState({
|
||||
favourited: <StarIcon className='copyButton' onClick={() => this.favourite()} />
|
||||
});
|
||||
}
|
||||
this.setState({
|
||||
favourited: localStorage.getItem('favouriteQuote') ? <StarIcon className='copyButton' onClick={() => this.favourite()} /> : null, // todo: fix (localStorage.getItem('favouriteQuoteEnabled') === 'false')
|
||||
copy: (localStorage.getItem('copyButton') === 'false') ? null : this.state.copy,
|
||||
tweet: (localStorage.getItem('tweetButton') === 'false') ? null: this.state.tweet
|
||||
});
|
||||
|
||||
if (localStorage.getItem('favouriteQuoteEnabled') === 'false') {
|
||||
this.setState({
|
||||
favourited: null
|
||||
});
|
||||
}
|
||||
|
||||
if (localStorage.getItem('copyButton') === 'false') {
|
||||
this.setState({
|
||||
copy: null
|
||||
});
|
||||
}
|
||||
|
||||
if (localStorage.getItem('tweetButton') === 'false') {
|
||||
this.setState({
|
||||
tweet: null
|
||||
});
|
||||
}
|
||||
|
||||
this.getQuote();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user