feat: new sideload addons tab and hot reload for more widgets

This commit is contained in:
David Ralph
2021-04-13 11:47:12 +01:00
parent 5c638ec355
commit a5b5ee1912
13 changed files with 111 additions and 40 deletions

View File

@@ -1,5 +1,7 @@
import React from 'react';
import EventBus from '../../../modules/helpers/eventbus';
import dtf from '../../../modules/helpers/date';
import './date.scss';
@@ -95,6 +97,19 @@ export default class DateWidget extends React.PureComponent {
}
componentDidMount() {
EventBus.on('refresh', (data) => {
if (data === 'date') {
const element = document.querySelector('.date');
if (localStorage.getItem('date') === 'false') {
return element.style.display = 'none';
}
element.style.display = 'block';
this.getDate();
}
});
this.getDate();
}