fix: favourite button, optimise widgets and remove dependency

This commit is contained in:
David Ralph
2021-08-16 12:21:37 +01:00
parent 23251d248b
commit 4d3c7cbbe6
10 changed files with 56 additions and 45 deletions

View File

@@ -1,6 +1,6 @@
import { PureComponent, Suspense, lazy } from 'react';
import { utcToZonedTime } from 'date-fns-tz';
import { convertTimezone } from '../../../modules/helpers/date';
import EventBus from '../../../modules/helpers/eventbus';
import './clock.scss';
@@ -23,8 +23,8 @@ export default class Clock extends PureComponent {
this.timer = setTimeout(() => {
let now = new Date();
const timezone = localStorage.getItem('timezone');
if (timezone) {
now = utcToZonedTime(now, timezone);
if (timezone && timezone !== 'auto') {
now = convertTimezone(now, timezone);
}
switch (localStorage.getItem('timeType')) {