mirror of
https://github.com/mue/mue.git
synced 2026-07-19 15:04:11 +02:00
bug fixes
This commit is contained in:
@@ -20,12 +20,15 @@ export default class Clock extends React.PureComponent {
|
||||
|
||||
// Percentage
|
||||
if (localStorage.getItem('percentageComplete') === 'true') {
|
||||
return this.setState({ time: (now.getHours() / 24).toFixed(2).replace('0.', '') + '%'});
|
||||
return this.setState({
|
||||
time: (now.getHours() / 24).toFixed(2).replace('0.', '') + '%'
|
||||
});
|
||||
}
|
||||
|
||||
// Analog clock
|
||||
if (localStorage.getItem('analog') === 'true') {
|
||||
require('react-clock/dist/Clock.css'); // load analog clock css
|
||||
|
||||
this.setState({
|
||||
time: now
|
||||
});
|
||||
@@ -49,7 +52,9 @@ export default class Clock extends React.PureComponent {
|
||||
time = `${('00' + now.getHours()).slice(-2)}:${('00' + now.getMinutes()).slice(-2)}${sec}`;
|
||||
}
|
||||
|
||||
this.setState({ time: time });
|
||||
this.setState({
|
||||
time: time
|
||||
});
|
||||
} else {
|
||||
// 12 hour support
|
||||
let hours = now.getHours();
|
||||
|
||||
@@ -31,7 +31,8 @@ export default class DateWidget extends React.PureComponent {
|
||||
day = dateYear;
|
||||
year = dateDay;
|
||||
break;
|
||||
default: break; // DMY
|
||||
default:
|
||||
break; // DMY
|
||||
}
|
||||
|
||||
let format;
|
||||
|
||||
Reference in New Issue
Block a user