perf: major widget refactoring

This commit is contained in:
David Ralph
2022-10-30 16:43:08 +00:00
parent d762a7c504
commit a9276a5fdb
15 changed files with 236 additions and 395 deletions

View File

@@ -30,7 +30,6 @@ const renderLoader = (current) => (
);
export default function MainModal({ modalClose }) {
const display = localStorage.getItem('showReminder') === 'true' ? 'flex' : 'none';
const [currentTab, setCurrentTab] = useState(0);
const changeTab = (type) => {

View File

@@ -1,5 +1,5 @@
import variables from 'modules/variables';
import { PureComponent, createRef } from 'react';
import { PureComponent } from 'react';
import { MdUpdate, MdOutlineExtensionOff, MdCode } from 'react-icons/md';
import { toast } from 'react-toastify';
import Modal from 'react-modal';

View File

@@ -26,8 +26,10 @@ export default class Tabs extends PureComponent {
};
render() {
const display = localStorage.getItem('showReminder') === 'true' ? 'flex' : 'none';
const reminderInfo = (
<div className="reminder-info" style={{ display: 'none' }}>
<div className="reminder-info" style={{ display }}>
<span className="title">{variables.getMessage('modals.main.settings.reminder.title')}</span>
<span className="subtitle">
{variables.getMessage('modals.main.settings.reminder.message')}