mirror of
https://github.com/mue/mue.git
synced 2026-06-12 03:28:46 +02:00
make codacy happy
This commit is contained in:
@@ -3,7 +3,7 @@ import React from 'react';
|
||||
const checkTime = (i) => {
|
||||
if (i < 10) i = '0' + i;
|
||||
return i;
|
||||
}
|
||||
};
|
||||
|
||||
export default class Clock extends React.Component {
|
||||
constructor(...args) {
|
||||
@@ -16,9 +16,9 @@ export default class Clock extends React.Component {
|
||||
|
||||
startTime() {
|
||||
const today = new Date();
|
||||
let h = today.getHours();
|
||||
let ampm = h >= 12 ? 'PM' : 'AM';
|
||||
const m = checkTime(today.getMinutes());
|
||||
let h = today.getHours();
|
||||
const ampm = h >= 12 ? 'PM' : 'AM';
|
||||
const m = checkTime(today.getMinutes());
|
||||
// const s = checkTime(today.getSeconds());
|
||||
|
||||
if (h > 12) h = h - 12;
|
||||
|
||||
@@ -10,7 +10,6 @@ export default class Search extends React.Component {
|
||||
<h1 id='photographer'></h1>
|
||||
<div id='backgroundCredits' class='tooltip'><RoomIcon classname='locationicon'/>
|
||||
<span class='tooltiptext' id='location'></span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -9,9 +9,9 @@ export default class Greeting extends React.Component {
|
||||
}
|
||||
|
||||
getGreeting() {
|
||||
const h = new Date().getHours();
|
||||
let t = 'Good evening'; // Set the default time string to "Good evening"
|
||||
if (h < 12) t = 'Good morning'; // If it's before 12am, set the time string to "Good morning"
|
||||
const h = new Date().getHours();
|
||||
let t = 'Good evening'; // Set the default time string to "Good evening"
|
||||
if (h < 12) t = 'Good morning'; // If it's before 12am, set the time string to "Good morning"
|
||||
else if (h < 18) t = 'Good afternoon'; // If it's before 6pm, set the time string to "Good afternoon"
|
||||
this.setState({ greeting: t }); // Set the state to the time string
|
||||
}
|
||||
|
||||
@@ -18,8 +18,8 @@ export default class Quote extends React.Component {
|
||||
this.setState({ quote: data.quote, author: data.author });
|
||||
} catch (e) {
|
||||
const randomInt = (min, max) => { return Math.floor(Math.random() * (max - min + 1)) + min; };
|
||||
const num = randomInt(1, 20);
|
||||
this.setState({ quote: quotes[num].quote, author: quotes[num].author })
|
||||
const num = randomInt(1, 20);
|
||||
this.setState({ quote: quotes[num].quote, author: quotes[num].author });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ export default class Search extends React.Component {
|
||||
<div id='searchBar' className='search-bar'>
|
||||
<form id='searchBar' className='searchbarform' action='https://duckduckgo.com/' onSubmit={('search()')}>
|
||||
<input type='text' placeholder='Search' name='q' id='searchText'className='searchText' />
|
||||
<div class="blursearcbBG" />
|
||||
<div class='blursearcbBG' />
|
||||
</form>
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user