mirror of
https://github.com/mue/mue.git
synced 2026-07-18 06:24:17 +02:00
codacy
This commit is contained in:
@@ -20,7 +20,7 @@ export default class View extends React.PureComponent {
|
||||
|
||||
viewStuff() {
|
||||
const elements = ['#searchBar', '.navbar-container', '.clock', '.greeting', '.quotediv'];
|
||||
elements.forEach(element => {
|
||||
elements.forEach((element) => {
|
||||
try {
|
||||
(this.state.hidden === false) ? document.querySelector(element).style.display = 'none' : document.querySelector(element).style.display = 'block';
|
||||
} catch (e) {
|
||||
|
||||
@@ -24,7 +24,7 @@ export default class Quote extends React.PureComponent {
|
||||
async getQuote() {
|
||||
const quotePack = JSON.parse(localStorage.getItem('quote_packs'));
|
||||
if (quotePack) {
|
||||
const data = quotePack[Math.floor(Math.random() * quotePack.length)]
|
||||
const data = quotePack[Math.floor(Math.random() * quotePack.length)];
|
||||
return this.setState({
|
||||
quote: '"' + data.quote + '"',
|
||||
author: data.author
|
||||
@@ -64,6 +64,6 @@ export default class Quote extends React.PureComponent {
|
||||
<h1 className='quote'>{`${this.state.quote}`}</h1>
|
||||
<h1 className='quoteauthor'>{this.state.author} {copy}</h1>
|
||||
</div>
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ export default class Search extends React.PureComponent {
|
||||
let value = document.getElementById('searchtext').value;
|
||||
if (!value) value = 'mue fast';
|
||||
window.location.href = url + '?q=' + value;
|
||||
}
|
||||
};
|
||||
|
||||
return <div id='searchBar' className='searchbar'>
|
||||
<form id='searchBar' className='searchbarform' action={url}>
|
||||
|
||||
Reference in New Issue
Block a user