From db5bf0019c0ad779db00d870ae39a94f1767a692 Mon Sep 17 00:00:00 2001 From: alexsparkes Date: Fri, 8 Apr 2022 23:01:32 +0100 Subject: [PATCH] fix: port welcome modal fix from 6.0.5 Co-authored-by: David Ralph --- src/components/modals/Modals.jsx | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/components/modals/Modals.jsx b/src/components/modals/Modals.jsx index 4a1b4821..029f8708 100644 --- a/src/components/modals/Modals.jsx +++ b/src/components/modals/Modals.jsx @@ -1,5 +1,5 @@ import variables from 'modules/variables'; -import { PureComponent, Suspense, lazy } from 'react'; +import { PureComponent } from 'react'; import Modal from 'react-modal'; //import Hotkeys from 'react-hot-keys'; @@ -9,10 +9,7 @@ import Preview from '../helpers/preview/Preview'; import EventBus from 'modules/helpers/eventbus'; -// Welcome modal is lazy loaded as the user won't use it every time they open a tab -// We used to lazy load the main and feedback modals, but doing so broke the modal open animation on first click -const Welcome = lazy(() => import('./welcome/Welcome')); -const renderLoader = () => <>; +import Welcome from './welcome/Welcome'; export default class Modals extends PureComponent { constructor() { @@ -21,7 +18,6 @@ export default class Modals extends PureComponent { mainModal: false, updateModal: false, welcomeModal: false, - feedbackModal: false, preview: false, }; } @@ -96,8 +92,7 @@ export default class Modals extends PureComponent { >
this.toggleModal('mainModal', false)} /> - - this.closeWelcome()} isOpen={this.state.welcomeModal} @@ -111,7 +106,6 @@ export default class Modals extends PureComponent { modalSkip={() => this.previewWelcome()} /> - {this.state.preview ? window.location.reload()} /> : null} {/*variables.keybinds.toggleModal && variables.keybinds.toggleModal !== '' ? this.toggleModal('mainModal', (this.state.mainModal === true ? false : true))}/> : null*/}