mirror of
https://github.com/mue/mue.git
synced 2026-07-27 02:31:06 +02:00
Fix all ESLint errors: case declarations, empty blocks, display names, keys, and more
This commit is contained in:
@@ -82,7 +82,7 @@ class Quote extends PureComponent {
|
||||
this.quote = createRef();
|
||||
this.quotediv = createRef();
|
||||
this.quoteauthor = createRef();
|
||||
this.authorDetails = (localStorage.getItem('authorDetails') === 'true' || true) ? true : false;
|
||||
this.authorDetails = localStorage.getItem('authorDetails') === 'true';
|
||||
}
|
||||
|
||||
useFavourite() {
|
||||
@@ -208,11 +208,11 @@ class Quote extends PureComponent {
|
||||
}
|
||||
|
||||
switch (this.state.type) {
|
||||
case 'custom':
|
||||
case 'custom': {
|
||||
let customQuote;
|
||||
try {
|
||||
customQuote = JSON.parse(localStorage.getItem('customQuote'));
|
||||
} catch (e) {
|
||||
} catch {
|
||||
// move to new format
|
||||
customQuote = [
|
||||
{
|
||||
@@ -242,7 +242,8 @@ class Quote extends PureComponent {
|
||||
});
|
||||
}
|
||||
break;
|
||||
case 'quote_pack':
|
||||
}
|
||||
case 'quote_pack': {
|
||||
if (offline) {
|
||||
return this.doOffline();
|
||||
}
|
||||
@@ -268,9 +269,11 @@ class Quote extends PureComponent {
|
||||
authorimg: data.fallbackauthorimg,
|
||||
});
|
||||
} else {
|
||||
return this.doOffline();
|
||||
this.doOffline();
|
||||
}
|
||||
case 'api':
|
||||
break;
|
||||
}
|
||||
case 'api': {
|
||||
if (offline) {
|
||||
return this.doOffline();
|
||||
}
|
||||
@@ -307,11 +310,12 @@ class Quote extends PureComponent {
|
||||
} else {
|
||||
this.doOffline();
|
||||
}
|
||||
} catch (e) {
|
||||
} catch {
|
||||
// ...and if that fails we load one locally
|
||||
this.doOffline();
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -188,7 +188,7 @@ class QuoteOptions extends PureComponent {
|
||||
{this.state.customQuote.length !== 0 ? (
|
||||
<div className="messagesContainer">
|
||||
{this.state.customQuote.map((_url, index) => (
|
||||
<div className="messageMap">
|
||||
<div className="messageMap" key={index}>
|
||||
<div className="icon">
|
||||
<MdOutlineFormatQuote />
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user