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,6 @@
import React from 'react';
import EventBus from '../../../modules/helpers/eventbus';
import dtf from '../../../modules/helpers/date';
import './greeting.scss';
@@ -101,6 +102,18 @@ export default class Greeting extends React.PureComponent {
}
componentDidMount() {
EventBus.on('refresh', (data) => {
if (data === 'greeting') {
const element = document.querySelector('.greeting');
if (localStorage.getItem('greeting') === 'false') {
return element.style.display = 'none';
}
element.style.display = 'block';
}
});
this.getGreeting(0);
}